View Issue Details

IDProjectCategoryView StatusLast Update
0021573mantisbtupgradepublic2016-10-02 18:41
ReporterNicolas PERDU Assigned Tovboctor  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
PlatformServeur OVHOSLinux 
Product Version1.3.0 
Target Version1.3.2Fixed in Version1.3.2 
Summary0021573: Error update from 1.2.19 to 1.3.0 / step 194
Description

I got one error during the update process.
Schema step 194: UpdateFunction ( check_token_serialization ) => BAD


Checking Installation
Setting Database Type GOOD
Checking PHP support for database type GOOD
Checking ADOdb Library version is at least 5.20.2 GOOD
Setting Database Hostname GOOD
Setting Database Username GOOD
Setting Database Password GOOD
Setting Database Name GOOD
Setting Admin Username GOOD
Setting Admin Password GOOD
Attempting to connect to database as admin GOOD
Attempting to connect to database as user GOOD
Checking Database Server Version
Running mysqli version 5.5.46-0+deb7u1-log GOOD

Installing Database
Create database if it does not exist GOOD
Attempting to connect to database as user GOOD
Schema step 194: UpdateFunction ( check_token_serialization ) BAD


Checking Installation
Config File Exists - Upgrade GOOD
Setting Database Type GOOD
Checking Database connection settings exist GOOD
Checking PHP support for database type GOOD
Checking PHP version (your version is 5.6.23) GOOD
Checking if safe mode is enabled for install script GOOD
Checking there is no 'config_inc.php' file in 1.2.x location. GOOD
Checking there is no 'custom_constants_inc.php' file in 1.2.x location. GOOD
Checking there is no 'custom_strings_inc.php' file in 1.2.x location. GOOD
Checking there is no 'custom_functions_inc.php' file in 1.2.x location. GOOD
Checking there is no 'custom_relationships_inc.php' file in 1.2.x location. GOOD
Checking there is no 'mc_config_defaults_inc.php' file in 1.2.x location. GOOD
Checking there is no 'mc_config_inc.php' file in 1.2.x location. GOOD

Steps To Reproduce

Migrate from 1.2.19 to 1.3.0

Additional Information

If you need others informations, don't hesitate to ask me.

TagsNo tags attached.
Attached Files
firefox_2016-09-07_13-52-30.jpg (90,133 bytes)   
firefox_2016-09-07_13-52-30.jpg (90,133 bytes)   

Relationships

related to 0021376 closeddregad Error in upgrade process 1.2.17 --> 1.3.0 
related to 0021312 confirmed Error Schema step 193 - Upgrading 1.2.19 to 1.3.0 
related to 0019561 closedvboctor Upgrade unattended fails when errors are set to halt 

Activities

atrol

atrol

2016-08-03 06:46

developer   ~0053745

Some information from forum
https://www.mantisbt.org/forums/viewtopic.php?f=3&t=23993

Seems that the problem is caused by NULL values in tokens table.

atrol

atrol

2016-08-03 07:00

developer   ~0053746

Last edited: 2016-08-03 07:02

@dregad, @vboctor
Do you think that NULL values make any sense in tokens table with type TOKEN_FILTER (or also other types)?
If not, we should delete rows with NULL values in upgrade step 194 instead of trying to unserialize the values and convert them to JSON.

[Edit]
The clean way would be to skip the rows in step 194 and to add a new step to delete the rows.
This is to ensure that there is no difference between upgrade from 1.3.0 to 1.3.1 and upgrade from any other version.

vboctor

vboctor

2016-08-03 10:17

manager   ~0053747

I would just make step 194 not fail. No need to delete these rows. If the code can make these values null, then it should be able to handle the null values. We can delete them and they may be introduced again.

jean.fms

jean.fms

2016-09-07 08:08

reporter   ~0053965

Hello
I have exactly same issue.
I don't understand why :

I have put the site offline.
I have saved my database.
I have restored my database on my local wamp server.
I have tried the migration. Success. Perfect.
I have transfered code on my web server.
I launched install.php . Arghhhhh!!! Fail

My wamp server is under php 5.4.3, the web server is php 5.3.17

My local database is under MySql 5.5.24 and collate utf8-bin. The web database is under MySql 5.1.73 and collate latin1; I have migrated this database after the fail to utf8-bin.

jean.fms

jean.fms

2016-09-07 08:24

reporter   ~0053966

Yes after erased the mantis_tokens_table content (just 2 records) the problem is resolved.

vboctor

vboctor

2016-09-26 23:50

manager   ~0054076

Here is a proposed fix
PR: https://github.com/mantisbt/mantisbt/pull/901

@jean.fms any chance you can verify the proposed fix on the db that used to fail? That would help to make sure that the fix works with the real data that failed previously.

Related Changesets

MantisBT: master-1.3.x df005537

2016-09-26 19:46

vboctor


Details Diff
Handle null tokens when upgrading from 1.2.x

Fixes 0021573
Affected Issues
0021573
mod - core/install_helper_functions_api.php Diff File