Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003245TestLinkInstallerpublic2010-03-05 00:472011-03-18 19:08
Reportergoosetea1 
Assigned Tofman 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.9 Beta 2 
Fixed in Version 
Summary0003245: [MIGRATION] Can not migrate data because of incorrect data in custom fields
Description1. There is Java Script error in version 1.8.4 (I believe I reported it before under other username, but can't find now), when you try to enter more than 255 characters in custom field. But still you can ignore this error and enter data.
2. Now I tried to migrate database and I get this error (I susspect it comes from the JS error I mentioned above)

migrate_testcases
Updating Database Contents Failed! - Upgrade failed!
TestLink setup couldn't install the default site into the selected database. The last error to occur was Column length too big for column 'default_value' (max = 255); use BLOB or TEXT instead during the execution of SQL statement ALTER TABLE /*prefix*/custom_fields MODIFY COLUMN default_value varchar(4000) NOT NULL default ''
TagsMigration
Database (MySQL,Postgres,etc)
Browser
PHP Version
TestCaseID
QA Team - Task Workflow Status
Attached Filespng file icon bug1.png [^] (38,840 bytes) 2010-03-05 00:47

- Relationships
child of 0004040closedfman Migration problems (Container Issue) 

-  Notes
(0009500)
goosetea1 (reporter)
2010-03-23 23:05

by the way, it is reproduced in 1.9 beta3

TestLink setup couldn't install the default site into the selected database. The last error to occur was Column length too big for column 'default_value' (max = 255); use BLOB or TEXT instead during the execution of SQL statement ALTER TABLE /*prefix*/custom_fields MODIFY COLUMN default_value varchar(4000) NOT NULL default ''

in beta 2 I migrated data by changing data types in sql scripts. But I am not sure that it is correct thing to do. I guess I will be changing field types then in all versions to come :(
(0009501)
goosetea1 (reporter)
2010-03-23 23:26

it looks as if the problem with varchar(4000) throughout mysql scripts

ALTER TABLE /*prefix*/custom_fields MODIFY COLUMN default_value varchar(4000) NOT NULL default '';

from what I read varchar can be 0 - 255
VARCHAR( ) A variable section from 0 to 255 characters long.
(0012595)
goosetea1 (reporter)
2010-11-16 18:39

still the problem is present in 1.9 release
TestLink setup will now attempt to setup the database:

Creating connection to Database Server: OK!

Connecting to database `test19`: OK!
Creating Testlink DB user `root`: OK! (ok - user_exists ok - grant assignment)
Processing:sql/alter_tables/1.9/mysql/DB.1.3/step1/db_schema_update.sql
migrate_testcasesRecords to process: count($workingSet)


 ============================================================================== DB Access Error - debug_print_backtrace() OUTPUT START ============================================================================== #0 database->exec_query( INSERT INTO cfield_design_values (field_id,node_id,value) VALUES ( 3, 14, '' ),( 3, 128, '' ),( 3, 204, '' ),( 3, 4153, '' ),( 3, 18, '' ),( 3, 130, '' ),( 3, 4049, '' ),( 3, 4154, '' ),( 3, 22, '' ),( 3, 206, '' ),( 3, 1127, '' ),( 3, 3889, '' ),( 3, 24, '' ),( 3, 26, '' ),( 3, 213, '' ),( 3, 1878, '' ),( 3, 28, 'User can select type of sorting (ascending or descending).' ),( 3, 32, '' ),( 3, 217, '' ),( 3, 34, '' ),( 3, 218, '' ),( 3, 36, '' ),( 3, 38, 'External organization users will see only candidates assigned to the organization profile.
Recruiters will see only their Candidates and Candidates with ATL status.' ),( 3, 137, 'External organization users will see only candidates assigned to the organization profile.
Recruiters will see only their Candidates and Candidates with ATL status.' ),( 3, 219, 'External organization users will see only candidates assigned to the organization profile.
Recruiters will see only their Candidates and Candidates with ATL status.' ),( 3, 40, 'User can select type of sorting (ascending or descending).' ),( 3, 44, 'Assign ?? is used in the case of ATL (Available to Lock) and TEMP LOCK Candidates or to reassign from an existing Recruiter to a new Recruiter.
Recruiter Manager can assign Recruiter only for Candidates from his Organization and Program.' ),( 3, 220, 'Assign ?? is used in the case of ATL (Available to Lock) and TEMP LOCK Candidates or to reassign from an existing Recruiter to a new Recruiter.
Recruiter Manager can assign Recruiter only for Candidates from his Organization and Program.' ),( 3, 221, 'Assign ?? is used in the case of ATL (Available to Lock) and TEMP LOCK Candidates or to reassign from an existing Recruiter to a new Recruiter.
Recruiter Manager can assign Recruiter only for Candidates from his Organization and Program.' ),( 3, 1348, 'Assign ?? is used in the case of ATL (Available to Lock) and TEMP LOCK Candidates or to reassign from an existing Recruiter to a new Recruiter.
Recruiter Manager can assign Recruiter only for Candidates from his Organization and Program.' ),( 3, 1349, 'Assign ?? is used in the case of ATL (Available to Lock) and TEMP LOCK Candidates or to reassign from an existing Recruiter to a new Recruiter.
Recruiter Manager can assign Recruiter only for Candidates from his O
(0012664)
fman (administrator)
2010-11-20 07:56
edited on: 2010-11-20 07:57

From MySQL Manuals:

Values in VARCHAR columns are variable-length strings. The length can be specified as a value from 0 to 255 before MySQL 5.0.3, and 0 to 65,535 in 5.0.3 and later versions. The effective maximum length of a VARCHAR in MySQL 5.0.3 and later is subject to the maximum row size (65,535 bytes, which is shared among all columns) and the character set used.

We expect people is using MySQL > 5.0.3 (just for the records XAMPP 1.7.3 is provided with MySQL 5.1.41).

(0012665)
fman (administrator)
2010-11-20 07:59

If you can provide your db (export zipped) we can do test on it ->
send to francisco.mancardi@gmail.com
(0013050)
goosetea1 (reporter)
2010-12-21 10:38
edited on: 2010-12-21 10:41

Sorry that I didn't answer before. I was on holiday.
I appreciate that you've pointed to mysql version. I had 4.1 so when I moved to 5.5 this problem with Varchar was resolved.
I had some difficulties with migration due to new tables in old database (probably at some point new tables were created in old database). But it is not direct testlink issue. I had to remove new tables from old dump (because migration script was giving me errors like "this table already exists").
And then some problems with ' being used in test cases. Looked like migration script couldn't handle \' and gave me errors like "inappropriate syntaxsys".
Anyway all those troubles were rather local troubles.
I think we should close this bug. thanks.

(0014022)
fman (administrator)
2011-03-18 19:08

release - 1.9.2 - 20110320

- Issue History
Date Modified Username Field Change
2010-03-05 00:47 goosetea1 New Issue
2010-03-05 00:47 goosetea1 File Added: bug1.png
2010-03-23 23:05 goosetea1 Note Added: 0009500
2010-03-23 23:26 goosetea1 Note Added: 0009501
2010-11-16 18:39 goosetea1 Note Added: 0012595
2010-11-20 07:56 fman Note Added: 0012664
2010-11-20 07:57 fman Note Edited: 0012664 View Revisions
2010-11-20 07:59 fman Note Added: 0012665
2010-11-20 07:59 fman Assigned To => fman
2010-11-20 07:59 fman Status new => assigned
2010-11-20 10:31 fman Relationship added child of 0004040
2010-11-20 10:31 fman Summary Can not migrate data because of incorrect data in custom fields => [MIGRATION] Can not migrate data because of incorrect data in custom fields
2010-11-20 10:32 fman Tag Attached: Migration
2010-12-21 10:38 goosetea1 Note Added: 0013050
2010-12-21 10:41 goosetea1 Note Edited: 0013050 View Revisions
2010-12-21 11:37 fman Status assigned => resolved
2010-12-21 11:37 fman Resolution open => fixed
2011-03-18 19:08 fman Note Added: 0014022
2011-03-18 19:08 fman Status resolved => closed



Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker