View Issue Details

IDProjectCategoryView StatusLast Update
0021573mantisbtupgradepublic2016-10-02 18:41
ReporterNicolas PERDUAssigned Tovboctor 
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
PlatformServeur OVHOSLinuxOS Version
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.

Relationships

related to 0021376 confirmed 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

View 2 revisions

@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 07:54

reporter  

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 23:46:58

vboctor

Details Diff
Handle null tokens when upgrading from 1.2.x

Fixes 0021573
mod - core/install_helper_functions_api.php Diff File

Issue History

Date Modified Username Field Change
2016-08-01 05:08 Nicolas PERDU New Issue
2016-08-01 05:17 atrol Product Version 1.2.19 => 1.3.0
2016-08-03 06:46 atrol Note Added: 0053745
2016-08-03 06:47 atrol Status new => confirmed
2016-08-03 06:47 atrol Target Version => 1.3.1
2016-08-03 07:00 atrol Note Added: 0053746
2016-08-03 07:02 atrol Note Edited: 0053746 View Revisions
2016-08-03 10:17 vboctor Note Added: 0053747
2016-08-03 10:34 vboctor Relationship added related to 0021376
2016-08-03 10:35 vboctor Relationship added related to 0021312
2016-08-28 10:37 atrol Target Version 1.3.1 => 1.3.2
2016-09-07 07:54 jean.fms File Added: firefox_2016-09-07_13-52-30.jpg
2016-09-07 08:08 jean.fms Note Added: 0053965
2016-09-07 08:24 jean.fms Note Added: 0053966
2016-09-26 23:50 vboctor Note Added: 0054076
2016-09-27 00:10 vboctor Relationship added related to 0019561
2016-09-29 03:30 vboctor Changeset attached => MantisBT master-1.3.x df005537
2016-09-29 03:30 vboctor Assigned To => vboctor
2016-09-29 03:30 vboctor Status confirmed => resolved
2016-09-29 03:30 vboctor Resolution open => fixed
2016-09-29 03:30 vboctor Fixed in Version => 1.3.2
2016-10-02 18:41 vboctor Status resolved => closed