Migration from 1.7.5 To 1.8 Giving Error..

1.8 related questions and discussions.
Please upgrade to LATEST 1.9.x.
No more fixes for 1.8.

Moderators: Amaradana, TurboPT, TL Developers

Migration from 1.7.5 To 1.8 Giving Error..

Postby satyendrasen » Wed Mar 18, 2009 7:05 am

Hi
I have migrated testlink from 1.7.5 To 1.8 then following error displayed.


Connecting to Testlink 1.7.2 (source) database. - testlink - ERROR ON exec_query() - database.class.php
0 - Incorrect syntax near the keyword 'SET'. - SET CHARACTER SET utf8;

THE MESSAGE :: SQL [1] executed [took 0.0066 secs][all took 0.0066 secs]: SET CHARACTER SET utf8; Query failed: errorcode[156] errormsg:Incorrect syntax near the keyword 'SET'.
ERROR ON exec_query() - database.class.php
0 - Incorrect syntax near '='. - SET collation_connection = 'utf8_general_ci';

THE MESSAGE :: SQL [2] executed [took 0.0070 secs][all took 0.0202 secs]: SET collation_connection = 'utf8_general_ci'; Query failed: errorcode[102] errormsg:Incorrect syntax near '='.
OK!

Your DB version (DB 1.1) seems not good, it must be DB 1.2
we are unable to continue

Thanks
Satyendra
satyendrasen
Advanced user
 
Posts: 15
Joined: Tue Mar 10, 2009 9:44 am

Postby havlatm » Wed Mar 18, 2009 11:46 am

You must "upgrade database" before migration. Check carefully information during upgrade process.
havlatm
Member of TestLink Community
 
Posts: 940
Joined: Mon Oct 31, 2005 1:24 am
Location: Czech

Postby satyendrasen » Wed Mar 18, 2009 12:09 pm

I have upgrade Data Base then migrated testlink from 1.7.5 To 1.8 then following error displayed

Connecting to Testlink 1.7.2 (source) database. - testlink - ERROR ON exec_query() - database.class.php
0 - Incorrect syntax near the keyword 'SET'. - SET CHARACTER SET utf8;

THE MESSAGE :: SQL [1] executed [took 0.0102 secs][all took 0.0102 secs]: SET CHARACTER SET utf8; Query failed: errorcode[156] errormsg:Incorrect syntax near the keyword 'SET'.
ERROR ON exec_query() - database.class.php
0 - Incorrect syntax near '='. - SET collation_connection = 'utf8_general_ci';

THE MESSAGE :: SQL [2] executed [took 0.0083 secs][all took 0.0287 secs]: SET collation_connection = 'utf8_general_ci'; Query failed: errorcode[102] errormsg:Incorrect syntax near '='.
OK!

Table testprojects - Missing field prefix
we are unable to continue

I am not geting where we are mising > Need help

Thanks
Satyendra
satyendrasen
Advanced user
 
Posts: 15
Joined: Tue Mar 10, 2009 9:44 am

Postby havlatm » Wed Mar 18, 2009 4:16 pm

Run 'UPGRADE DATABASE' before you start migration. It's available on Installation first page.
havlatm
Member of TestLink Community
 
Posts: 940
Joined: Mon Oct 31, 2005 1:24 am
Location: Czech

Incorrect syntax when accessing Jira Issue Summary

Postby roto8car » Mon Mar 30, 2009 11:17 pm

http://www.testlink.org/mantis/view.php?id=2282

Ok, I've upgraded to the official TL1.8 release. I still have to make modifications to int_jira.php for it to show the bug summary.

I am still having an issue pulling the status from my JiraDB:

ERROR ON exec_query() - database.class.php
0 - Incorrect syntax near '.'. - SELECT s.pname as jiraschema.issuestatus FROM jiraschema.issuestatus s, jiraschema.jiraissue i WHERE i.pkey='IMS-2' AND i.issuestatus = s.ID

THE MESSAGE :: SQL [1] executed [took 0.1175 secs][all took 0.1175 secs]: SELECT s.pname as jiraschema.issuestatus FROM jiraschema.issuestatus s, jiraschema.jiraissue i WHERE i.pkey='IMS-2' AND i.issuestatus = s.ID Query failed: errorcode[102] errormsg:Incorrect syntax near '.'.

What's wrong with the syntax
Code: Select all
/**
     * Returns the status of the bug with the given id
     * this function is not directly called by TestLink.
     *
     * @return string returns the status of the given bug (if found in the db), or false else
     *
      * 2005119 - scs - fixed using of wrong index
     **/
    function getBugStatus($id)
    {
        if (!$this->isConnected())
            return false;

        $status = false;
       
        // 20070818 - francisco@grup.com
 [u]   // THIS IS THE ORIGINAL Q@UERY THAT DOESN'T WORK [/u]
        // $query = "SELECT issuestatus FROM jiraissue WHERE pkey='$id'";

// This is a modification that worked on the query to pull the summary
        $query = "SELECT s.pname as jiraschema.issuestatus " .
                 "FROM jiraschema.issuestatus s, jiraschema.jiraissue i " .
                 "WHERE i.pkey='$id' AND i.issuestatus = s.ID";
       
        $result = $this->dbConnection->exec_query($query);
        if ($result)
        {
            $status = $this->dbConnection->fetch_array($result);
            if ($status)
            {
                $status = $status['issuestatus'];
            }
            else
                $status = null;
        }
        return $status;
       
    }
[/code]
roto8car
TestLink user
 
Posts: 5
Joined: Wed Oct 22, 2008 9:06 pm

Postby havlatm » Tue Mar 31, 2009 8:58 am

Your query is wrong. See how you define tables.
havlatm
Member of TestLink Community
 
Posts: 940
Joined: Mon Oct 31, 2005 1:24 am
Location: Czech

Postby roto8car » Tue Mar 31, 2009 4:13 pm

UPDATE:
Needed to add SELECT permissions to the issuestatus table in JIRA.

Then updated the query in C:\EasyPHP 3.0\testlink_release_rep\lib\bugtracking\int_jira.php to the following:
Code: Select all
   function getBugStatus($id)
   {
      if (!$this->isConnected())
         return false;

      $status = false;
      
      // 20070818 - francis@potesi.com
      // [color=red]Original Query[/color]: $query = "SELECT issuestatus FROM jiraissue WHERE pkey='$id'";
      // [color=red]First MOD[/color]: $query = "SELECT s.pname as jiraschema.issuestatus " .
      //         "FROM jiraschema.issuestatus s, jiraschema.jiraissue i " .
      //         "WHERE i.pkey='$id' AND i.issuestatus = s.ID";
      
         $query = "SELECT s.pname " .
                  "FROM jiraschema.issuestatus s, jiraschema.jiraissue i ".
                  "WHERE i.pkey = 'ims-3' AND i.issuestatus = s.ID";
         $result = $this->dbConnection->exec_query($query);
         if ($result)
         {
            $status = $this->dbConnection->fetch_array($result);
            if ($status)
               $status = $status['issuestatus'];
            else
               $status = null;
      }
      return $status;
      
   }


Something in that bit of code is causing this error in the log, but no more errors are appearing on screen:
[>>][49d24b30c3b27498699995][DEFAULT][/testlink/lib/results/resultsByStatus.php][09/Mar/31 16:56:16]
[09/Mar/31 16:56:16][WARNING][9d129b949e734a4f59525f40b98615f1][GUI]
E_NOTICE
Undefined index: issuestatus - in C:\EasyPHP 3.0\testlink_release_rep\lib\bugtracking\int_jira.php - Line 87
[09/Mar/31 16:56:17][WARNING][9d129b949e734a4f59525f40b98615f1][GUI]
E_NOTICE
Undefined index: issuestatus - in C:\EasyPHP 3.0\testlink_release_rep\lib\bugtracking\int_jira.php - Line 87
[09/Mar/31 16:56:17][ERROR][9d129b949e734a4f59525f40b98615f1][GUI]
flushHttpHeader> Invalid format: 0
[<<][49d24b30c3b27498699995][DEFAULT][/testlink/lib/results/resultsByStatus.php][09/Mar/31 16:56:16][09/Mar/31 16:56:17][took 0.28871 secs]
roto8car
TestLink user
 
Posts: 5
Joined: Wed Oct 22, 2008 9:06 pm


Return to TestLink 1.8 (OBSOLETE => EOL)[LOCKED]



Who is online

Users browsing this forum: No registered users and 2 guests

cron