"Requirements Operation" usage cause DB Access Error
Posted: Thu Nov 25, 2010 12:09 pm
Hello TestLink Team!
I have upgraded version 1.8.5 to 1.9.0 without issues. Upon verification and playing with system, I was discovered following DB Access error during the "Requirements Operation" option usage:
DB Access Error - debug_print_backtrace() OUTPUT START
==============================================================================
#0 database->exec_query( /* Class:requirement_mgr - Method: get_by_id */ SELECT REQ.id,REQ.srs_id,REQ.req_doc_id, REQV.scope,REQV.status,REQV.type,REQV.active, REQV.is_open,REQV.author_id,REQV.version,REQV.id AS version_id, REQV.expected_coverage,REQV.creation_ts,REQV.modifier_id, REQV.modification_ts,NH_REQ.name AS title, REQ_SPEC.testproject_id, NH_RSPEC.name AS req_spec_title, REQ_SPEC.doc_id AS req_spec_doc_id, NH_REQ.node_order FROM requirements REQ JOIN nodes_hierarchy NH_REQ ON NH_REQ.id = REQ.id JOIN nodes_hierarchy NH_REQV ON NH_REQV.parent_id = NH_REQ.id JOIN req_versions REQV ON REQV.id = NH_REQV.id JOIN req_specs REQ_SPEC ON REQ_SPEC.id = REQ.srs_id JOIN nodes_hierarchy NH_RSPEC ON NH_RSPEC.id = REQ_SPEC.id WHERE NH_REQV.parent_id IN (1848) AND REQV.version = ORDER BY NH_REQ.node_order,NH_REQ.name,REQ.req_doc_id, -1) called at [C:\apache\localhost\www\testlink-1.9.0\lib\functions\database.class.php:711]
#1 database->get_recordset( /* Class:requirement_mgr - Method: get_by_id */ SELECT REQ.id,REQ.srs_id,REQ.req_doc_id, REQV.scope,REQV.status,REQV.type,REQV.active, REQV.is_open,REQV.author_id,REQV.version,REQV.id AS version_id, REQV.expected_coverage,REQV.creation_ts,REQV.modifier_id, REQV.modification_ts,NH_REQ.name AS title, REQ_SPEC.testproject_id, NH_RSPEC.name AS req_spec_title, REQ_SPEC.doc_id AS req_spec_doc_id, NH_REQ.node_order FROM requirements REQ JOIN nodes_hierarchy NH_REQ ON NH_REQ.id = REQ.id JOIN nodes_hierarchy NH_REQV ON NH_REQV.parent_id = NH_REQ.id JOIN req_versions REQV ON REQV.id = NH_REQV.id JOIN req_specs REQ_SPEC ON REQ_SPEC.id = REQ.srs_id JOIN nodes_hierarchy NH_RSPEC ON NH_RSPEC.id = REQ_SPEC.id WHERE NH_REQV.parent_id IN (1848) AND REQV.version = ORDER BY NH_REQ.node_order,NH_REQ.name,REQ.req_doc_id) called at [C:\apache\localhost\www\testlink-1.9.0\lib\functions\requirement_mgr.class.php:254]
#2 requirement_mgr->get_by_id(Array ([0] => 1848), , , Array ([order_by] => ORDER BY NH_REQ.node_order,NH_REQ.name,REQ.req_doc_id), Array ([status] => ,[type] => )) called at [C:\apache\localhost\www\testlink-1.9.0\lib\functions\requirement_spec_mgr.class.php:629]
#3 requirement_spec_mgr->get_requirements(1846, all, , Array ([output] => count), ) called at [C:\apache\localhost\www\testlink-1.9.0\lib\functions\requirement_spec_mgr.class.php:884]
#4 requirement_spec_mgr->get_requirements_count(1846) called at [C:\apache\localhost\www\testlink-1.9.0\lib\requirements\reqSpecView.php:83]
#5 initialize_gui(database Object ([db] => ADODB_mysql Object ([databaseType] => mysql,[dataProvider] => mysql,[hasInsertID] => 1,[hasAffectedRows] => 1,[metaTablesSQL] => SHOW TABLES,[metaColumnsSQL] => SHOW COLUMNS FROM `%s`,[fmtTimeStamp] => 'Y-m-d H:i:s',[hasLimit] => 1,[hasMoveFirst] => 1,[hasGenID] => 1,[isoDates] => 1,[sysDate] => CURDATE(),[sysTimeStamp] => NOW(),[hasTransactions] => ,[forceNewConnect] => 1,[poorAffectedRows] => 1,[clientFlags] => 0,[substr] => substring,[nameQuote] => `,[compat323] => ,[_genIDSQL] => update %s set id=LAST_INSERT_ID(id+1);,[_genSeqSQL] => create table %s (id int not null),[_genSeqCountSQL] => select count(*) from %s,[_genSeq2SQL] => insert into %s values (%s),[_dropSeqSQL] => drop table %s,[database] => testlink,[host] => localhost,[user] => admin,[password] => admin,[debug] => ,[maxblobsize] => 262144,[concat_operator] => +,[length] => length,[random] => rand(),[upperCase] => upper,[fmtDate] => 'Y-m-d',[true] => 1,[false] => 0,[replaceQuote] => \',[charSet] => ,[metaDatabasesSQL] => ,[uniqueOrderBy] => ,[emptyDate] => ,[emptyTimeStamp] => ,[lastInsID] => ,[hasTop] => ,[readOnly] => ,[genID] => 0,[raiseErrorFn] => ,[cacheSecs] => 3600,[memCache] => ,[memCacheHost] => ,[memCachePort] => 11211,[memCacheCompress] => ,[sysUTimeStamp] => ,[arrayClass] => ADORecordSet_array,[noNullStrings] => ,[numCacheHits] => 0,[numCacheMisses] => 0,[pageExecuteCountRows] => 1,[uniqueSort] => ,[leftOuter] => ,[rightOuter] => ,[ansiOuter] => ,[autoRollback] => ,[fnExecute] => ,[fnCacheExecute] => ,[blobEncodeType] => ,[rsPrefix] => ADORecordSet_,[autoCommit] => 1,[transOff] => 0,[transCnt] => 0,[fetchMode] => 2,[null2null] => null,[_oldRaiseFn] => ,[_transOK] => ,[_connectionID] => Resource id #46,[_errorMsg] => 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 'ORDER BY NH_REQ.node_order,NH_REQ.name,REQ.req_doc_id' at line 1,[_errorCode] => ,[_queryID] => Resource id #76,[_isPersistentConnection] => ,[_bindInputArray] => ,[_evalAll] => ,[_affected] => ,[_logsql] => ,[_transmode] => ,[databaseName] => testlink),[queries_array] => Array (),[is_connected] => 1,[nQuery] => 23,[overallDuration] => 0.2764,[] => 0,[] => 0), stdClass Object ([req_spec_id] => 1846,[tproject_id] => 3,[tproject_name] => Connecto HW2)) called at [C:\apache\localhost\www\testlink-1.9.0\lib\requirements\reqSpecView.php:31]
==============================================================================
Would you, please, advice, regarding cause of this problem. Thank you in advance
I have upgraded version 1.8.5 to 1.9.0 without issues. Upon verification and playing with system, I was discovered following DB Access error during the "Requirements Operation" option usage:
DB Access Error - debug_print_backtrace() OUTPUT START
==============================================================================
#0 database->exec_query( /* Class:requirement_mgr - Method: get_by_id */ SELECT REQ.id,REQ.srs_id,REQ.req_doc_id, REQV.scope,REQV.status,REQV.type,REQV.active, REQV.is_open,REQV.author_id,REQV.version,REQV.id AS version_id, REQV.expected_coverage,REQV.creation_ts,REQV.modifier_id, REQV.modification_ts,NH_REQ.name AS title, REQ_SPEC.testproject_id, NH_RSPEC.name AS req_spec_title, REQ_SPEC.doc_id AS req_spec_doc_id, NH_REQ.node_order FROM requirements REQ JOIN nodes_hierarchy NH_REQ ON NH_REQ.id = REQ.id JOIN nodes_hierarchy NH_REQV ON NH_REQV.parent_id = NH_REQ.id JOIN req_versions REQV ON REQV.id = NH_REQV.id JOIN req_specs REQ_SPEC ON REQ_SPEC.id = REQ.srs_id JOIN nodes_hierarchy NH_RSPEC ON NH_RSPEC.id = REQ_SPEC.id WHERE NH_REQV.parent_id IN (1848) AND REQV.version = ORDER BY NH_REQ.node_order,NH_REQ.name,REQ.req_doc_id, -1) called at [C:\apache\localhost\www\testlink-1.9.0\lib\functions\database.class.php:711]
#1 database->get_recordset( /* Class:requirement_mgr - Method: get_by_id */ SELECT REQ.id,REQ.srs_id,REQ.req_doc_id, REQV.scope,REQV.status,REQV.type,REQV.active, REQV.is_open,REQV.author_id,REQV.version,REQV.id AS version_id, REQV.expected_coverage,REQV.creation_ts,REQV.modifier_id, REQV.modification_ts,NH_REQ.name AS title, REQ_SPEC.testproject_id, NH_RSPEC.name AS req_spec_title, REQ_SPEC.doc_id AS req_spec_doc_id, NH_REQ.node_order FROM requirements REQ JOIN nodes_hierarchy NH_REQ ON NH_REQ.id = REQ.id JOIN nodes_hierarchy NH_REQV ON NH_REQV.parent_id = NH_REQ.id JOIN req_versions REQV ON REQV.id = NH_REQV.id JOIN req_specs REQ_SPEC ON REQ_SPEC.id = REQ.srs_id JOIN nodes_hierarchy NH_RSPEC ON NH_RSPEC.id = REQ_SPEC.id WHERE NH_REQV.parent_id IN (1848) AND REQV.version = ORDER BY NH_REQ.node_order,NH_REQ.name,REQ.req_doc_id) called at [C:\apache\localhost\www\testlink-1.9.0\lib\functions\requirement_mgr.class.php:254]
#2 requirement_mgr->get_by_id(Array ([0] => 1848), , , Array ([order_by] => ORDER BY NH_REQ.node_order,NH_REQ.name,REQ.req_doc_id), Array ([status] => ,[type] => )) called at [C:\apache\localhost\www\testlink-1.9.0\lib\functions\requirement_spec_mgr.class.php:629]
#3 requirement_spec_mgr->get_requirements(1846, all, , Array ([output] => count), ) called at [C:\apache\localhost\www\testlink-1.9.0\lib\functions\requirement_spec_mgr.class.php:884]
#4 requirement_spec_mgr->get_requirements_count(1846) called at [C:\apache\localhost\www\testlink-1.9.0\lib\requirements\reqSpecView.php:83]
#5 initialize_gui(database Object ([db] => ADODB_mysql Object ([databaseType] => mysql,[dataProvider] => mysql,[hasInsertID] => 1,[hasAffectedRows] => 1,[metaTablesSQL] => SHOW TABLES,[metaColumnsSQL] => SHOW COLUMNS FROM `%s`,[fmtTimeStamp] => 'Y-m-d H:i:s',[hasLimit] => 1,[hasMoveFirst] => 1,[hasGenID] => 1,[isoDates] => 1,[sysDate] => CURDATE(),[sysTimeStamp] => NOW(),[hasTransactions] => ,[forceNewConnect] => 1,[poorAffectedRows] => 1,[clientFlags] => 0,[substr] => substring,[nameQuote] => `,[compat323] => ,[_genIDSQL] => update %s set id=LAST_INSERT_ID(id+1);,[_genSeqSQL] => create table %s (id int not null),[_genSeqCountSQL] => select count(*) from %s,[_genSeq2SQL] => insert into %s values (%s),[_dropSeqSQL] => drop table %s,[database] => testlink,[host] => localhost,[user] => admin,[password] => admin,[debug] => ,[maxblobsize] => 262144,[concat_operator] => +,[length] => length,[random] => rand(),[upperCase] => upper,[fmtDate] => 'Y-m-d',[true] => 1,[false] => 0,[replaceQuote] => \',[charSet] => ,[metaDatabasesSQL] => ,[uniqueOrderBy] => ,[emptyDate] => ,[emptyTimeStamp] => ,[lastInsID] => ,[hasTop] => ,[readOnly] => ,[genID] => 0,[raiseErrorFn] => ,[cacheSecs] => 3600,[memCache] => ,[memCacheHost] => ,[memCachePort] => 11211,[memCacheCompress] => ,[sysUTimeStamp] => ,[arrayClass] => ADORecordSet_array,[noNullStrings] => ,[numCacheHits] => 0,[numCacheMisses] => 0,[pageExecuteCountRows] => 1,[uniqueSort] => ,[leftOuter] => ,[rightOuter] => ,[ansiOuter] => ,[autoRollback] => ,[fnExecute] => ,[fnCacheExecute] => ,[blobEncodeType] => ,[rsPrefix] => ADORecordSet_,[autoCommit] => 1,[transOff] => 0,[transCnt] => 0,[fetchMode] => 2,[null2null] => null,[_oldRaiseFn] => ,[_transOK] => ,[_connectionID] => Resource id #46,[_errorMsg] => 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 'ORDER BY NH_REQ.node_order,NH_REQ.name,REQ.req_doc_id' at line 1,[_errorCode] => ,[_queryID] => Resource id #76,[_isPersistentConnection] => ,[_bindInputArray] => ,[_evalAll] => ,[_affected] => ,[_logsql] => ,[_transmode] => ,[databaseName] => testlink),[queries_array] => Array (),[is_connected] => 1,[nQuery] => 23,[overallDuration] => 0.2764,[] => 0,[] => 0), stdClass Object ([req_spec_id] => 1846,[tproject_id] => 3,[tproject_name] => Connecto HW2)) called at [C:\apache\localhost\www\testlink-1.9.0\lib\requirements\reqSpecView.php:31]
==============================================================================
Would you, please, advice, regarding cause of this problem. Thank you in advance