Bug 16835 - Upgrade database failed from 3.2200000 to new version
Summary: Upgrade database failed from 3.2200000 to new version
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (web-based installer) (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-30 09:28 UTC by lenhatanh86
Modified: 2023-09-09 21:40 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lenhatanh86 2016-06-30 09:28:17 UTC
Update errors :

    [Thu Jun 30 16:12:57 2016] updatedatabase.pl: DBD::mysql::st execute failed: Data truncated for column 'type' at row 1 [for Statement "INSERT INTO `search_field` ( `label`, `name`, `type`) VALUES ( ?, ?, ? )" with ParamValues: 0='Match', 1='Match', 2=''] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1834.
    [Thu Jun 30 16:12:57 2016] updatedatabase.pl: DBIx::Class::Storage::DBI::_dbh_execute(): Data truncated for column 'type' at row 1 at /usr/share/koha/lib/Koha/Objects.pm line 101


When I checked code on git, this error maybe related with file /admin/searchengine/elasticsearch/mappings.yaml and file installer/data/mysql/updatedatabase.pl (from line 12263)
Comment 1 Bob Ewart 2016-09-29 15:48:40 UTC
This is a show stopper for me.  I'm upgrading from 3.22.11 to 16.05.04 compiled from source on openSUSE.  

The original upgrade made a lot of changes and ended with this error. The link at the bottom to log in brought me back to the web installer and gave me this error in step 3.

I would go into mysql and increase the size of the 'type' field if I could figure out what table it is referring to.  The error message is not very helpful.f
Comment 2 Bob Ewart 2016-09-29 17:50:46 UTC
The problem is caused by STRICT_TRANS_TABLES.  Delete it from my.cnf and restart mysql

search_field.type is an enum and '' is not one of the listed values which causes STRICT_TRANS_TABLES to throw an error.

I still think 'data truncated' is not very descriptive of the error, but that's mysql (or mariadb's) problem.
Comment 3 Katrin Fischer 2023-09-09 21:40:15 UTC
This should have been resolved by bug 20229 making sure that Koha doesn't use STRICT_TRANS_TABLES.