@@ -, +, @@ STRICT_TRANS_TABLES mysql > SELECT @@GLOBAL.sql_mode; verify that STRICT_TRANS_TABLES is not set mysql > SET @@GLOBAL.sql_mode = 'STRICT_TRANS_TABLES'; verify that it fails with a "software error" --- installer/data/mysql/kohastructure.sql | 4 ++-- installer/data/mysql/updatedatabase.pl | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -181,7 +181,7 @@ CREATE TABLE `biblioitems` ( -- information related to bibliographic records in `cn_sort` varchar(255) default NULL, -- normalized version of the call number used for sorting `agerestriction` varchar(255) default NULL, -- target audience/age restriction from the bib record (MARC21 521$a) `totalissues` int(10), - `marcxml` longtext NOT NULL, -- full bibliographic MARC record in MARCXML + `marcxml` longtext, -- full bibliographic MARC record in MARCXML PRIMARY KEY (`biblioitemnumber`), KEY `bibinoidx` (`biblioitemnumber`), KEY `bibnoidx` (`biblionumber`), @@ -812,7 +812,7 @@ CREATE TABLE `deletedbiblioitems` ( -- information about bibliographic records t `cn_sort` varchar(255) default NULL, -- normalized version of the call number used for sorting `agerestriction` varchar(255) default NULL, -- target audience/age restriction from the bib record (MARC21 521$a) `totalissues` int(10), - `marcxml` longtext NOT NULL, -- full bibliographic MARC record in MARCXML + `marcxml` longtext, -- full bibliographic MARC record in MARCXML PRIMARY KEY (`biblioitemnumber`), KEY `bibinoidx` (`biblioitemnumber`), KEY `bibnoidx` (`biblionumber`), --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -9669,6 +9669,20 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion = "3.19.00.XXX"; +if(CheckVersion($DBversion)) { + $dbh->do(q{ + ALTER TABLE biblioitems MODIFY COLUMN marcxml longtext + }); + + $dbh->do(q{ + ALTER TABLE deletedbiblioitems MODIFY COLUMN marcxml longtext + }); + + print "Upgrade to $DBversion done (Bug 13523 - Remove NOT NULL restriction on field marcxml due to mysql STRICT_TRANS_TABLES)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) --