Upgrade 1.6.3-1.7.5 duplicate entry in testplan_tcversions

The release related discussions, plans and questions.

Upgrade 1.6.3-1.7.5 duplicate entry in testplan_tcversions

Postby timbo » Mon Apr 20, 2009 3:19 pm

Hi there,

This seems to be a reasonably common issue but no-one has posted any fix yet. If anyone has please let me know :o)

Here is my issue. I am trying to upgrade from 1.6.3 to 1.8.1 but as this was not working at all am now trying 1.6.3 to 1.7.5 as a step before going to 1.8.1.

The error i get is at this point:
Test case -> test plan assignments: [Click to show details] 15:47:52 and i get the following error in the httpd logs

[Mon Apr 20 15:21:04 2009] [error] [client 192.168.76.165] PHP Fatal error: mysql error: [1062: Duplicate entry '154882-104906' for key 2] in EXECUTE("INSERT INTO testplan_tcversions (testplan_id,tcversion_id) VALUES(154882,104906)")\n in /var/www/html/testlink17/third_party/adodb/adodb-errorhandler.inc.php on line 77, referer: http://viper/testlink17/install/license.php


I can see where the 104906 comes from in the original database but not the 154882 number.

I took the key off the table and it then ran though. From here i was then able to get a full list of the duplicates.

select testplan_id, tcversion_id, count(*) from testplan_tcversions
group by testplan_id, tcversion_id
having count(*) > 1

of which i had 15 rows with a count of 2. any help in stopping these duplicates appearing would be great - i just need to understand where the testplan_id comes from in the old database.

Once i removed the index from the table i then got an error on the next part too:

Executions results: [Click to show details] 15:48:23

[Mon Apr 20 15:48:26 2009] [error] [client 192.168.76.165] PHP Notice: Undefined index: 4021 in /var/www/html/testlink17/install/migration/migrate_16_to_17_functions.php on line 637, referer: http://viper/testlink17/install/license.php
[Mon Apr 20 15:48:26 2009] [error] [client 192.168.76.165] PHP Fatal error: mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2005-06-02','')' at line 1] in EXECUTE("INSERT INTO executions (build_id,tester_id,status,testplan_id,tcversion_id,execution_ts,notes) VALUES ( 284, 1, 'p',154938, ,'2005-06-02','')")\n in /var/www/html/testlink17/third_party/adodb/adodb-errorhandler.inc.php on line 77, referer: http://viper/testlink17/install/license.php


But not sure if the duplicates have then caused this issue to occur too.

Any help would be greatly appreciated.

Thanks

Tim
timbo
TestLink user
 
Posts: 9
Joined: Thu Jul 19, 2007 2:46 pm

Postby fman » Tue Apr 21, 2009 5:33 pm

open issue on mantis and I will post here code I've sent to another user with similar problem
fman
Member of TestLink Community
 
Posts: 3000
Joined: Tue Nov 15, 2005 7:19 am

Postby timbo » Wed Apr 22, 2009 2:03 pm

Hi fman,

thanks for the help but I didn't see anything posted there?!

regards

Tim
timbo
TestLink user
 
Posts: 9
Joined: Thu Jul 19, 2007 2:46 pm

Postby fman » Thu Apr 23, 2009 9:19 am

I write wrong => post there on mantis

Please send me a email to francisco.mancardi@gmail.com and I will send you code changes

regards
fman
Member of TestLink Community
 
Posts: 3000
Joined: Tue Nov 15, 2005 7:19 am


Return to TestLink 1.7 (Closed)



Who is online

Users browsing this forum: No registered users and 2 guests