Bug 22919: Fix insert of authorities_normal_marc21.sql with strict SQL modes

If strict SQL modes are set, the insert of authorities_normal_marc21.sql
will fail.

Test plan:
DELETE FROM auth_subfield_structure;
DELETE FROM auth_tag_structure;
DELETE FROM auth_types;
SET sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
source /home/vagrant/kohaclone/installer/data/mysql/en/marcflavour/marc21/mandatory/authorities_normal_marc21.sql

You should not see any errors.
Without this patch you see:
ERROR 1366 (22007) at line 280 in file:
'/home/vagrant/kohaclone/installer/data/mysql/en/marcflavour/marc21/mandatory/authorities_normal_marc21.sql':
Incorrect integer value: ' for column 'linkid' at row 148
'

Signed-off-by: nabila <lovenabila@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2019-05-30 09:36:31 -05:00 committed by Martin Renvoize
parent 3f93acbc6c
commit 703ec1e2f2
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -425,7 +425,7 @@ INSERT INTO `auth_subfield_structure` (`authtypecode`, `tagfield`, `tagsubfield`
('', '055', 'd', 'Volumes/dates to which call number applies', 'Volumes/dates to which call number applies', 0, 0, 0, NULL, NULL, NULL, 0, 0, 0, '', ''),
('', '055', '0', 'Authority record control number or standard number', 'Authority record control number or standard number', 1, 0, 0, NULL, NULL, NULL, 0, 0, 0, '', ''),
('', '055', '1', 'Real World Object URI', 'Real World Object URI', 1, 0, 0, NULL, NULL, NULL, 0, 0, 0, '', ''),
('', '055', '2', 'Number source', 'Number source', 0, 0, 0, NULL, NULL, NULL, 0, 0, '', '', ''),
('', '055', '2', 'Number source', 'Number source', 0, 0, 0, NULL, NULL, NULL, 0, 0, 0, '', ''),
('', '055', '5', 'Institution to which field applies', 'Institution to which field applies', 1, 0, 0, NULL, NULL, NULL, 0, 0, 0, '', ''),
('', '055', '6', 'Linkage', 'Linkage', 0, 0, 0, NULL, NULL, NULL, 0, 0, 0, '', ''),
('', '055', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, 0, NULL, NULL, NULL, 0, 0, 0, '', ''),