Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003656TestLinkDatabase MySQLpublic2010-08-05 16:012010-08-31 20:27
Reporterbrainbug 
Assigned Tofman 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformlinuxOSubuntuOS Version
Product Version1.9 Beta 5 
Fixed in Version1.9 Beta 6 
Summary0003656: when you filter Events by user you will get a SQL Syntax error on Frontend
DescriptionIt seems that when you filter the events by user the select tries to use table
"Transactions", but the table's correct name is
"transactions" (case sensitive!)

Frontend-message:
 ==============================================================================

 DB Access Error - debug_print_backtrace() OUTPUT START

 ==============================================================================

#0 database->exec_query(SELECT E.id FROM events E JOIN Transactions T ON T.id = E.transaction_id AND T.user_id IN (39) ORDER BY transaction_id DESC,fired_at DESC, 500) called at [/usr/local/testlink_19b5/lib/functions/database.class.php:558]
#1 database->fetchColumnsIntoArray(SELECT E.id FROM events E JOIN Transactions T ON T.id = E.transaction_id AND T.user_id IN (39) ORDER BY transaction_id DESC,fired_at DESC, id, 500) called at [/usr/local/testlink_19b5/lib/functions/object.class.php:478]
0000002 tlDBObject::createObjectsFromDBbySQL(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_19b4,[host] => localhost,[user] => testlink_19b4,[password] => testlink_19b4,[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 0000043,[_errorMsg] => Table 'testlink_19b4.Transactions' doesn't exist,[_errorCode] => ,[_queryID] => Resource id 0000331,[_isPersistentConnection] => ,[_bindInputArray] => ,[_evalAll] => ,[_affected] => ,[_logsql] => ,[_transmode] => ,[databaseName] => testlink_19b4),[queries_array] => Array (),[is_connected] => 1,[nQuery] => 286,[overallDuration] => 0.1496,[] => 0,[] => 0), SELECT E.id FROM events E JOIN Transactions T ON T.id = E.transaction_id AND T.user_id IN (39) ORDER BY transaction_id DESC,fired_at DESC, id, tlEvent, 1, 4294967295, 500) called at [/usr/local/testlink_19b5/lib/functions/logger.class.php:532]
0000003 tlEventManager->getEventsFor(, , , , 500, , , 39) called at [/usr/local/testlink_19b5/lib/functions/logger.class.php:104]
0000004 tlLogger->getEventsFor(, , , , 500, , , 39) called at [/usr/local/testlink_19b5/lib/events/eventviewer.php:56]

 ==============================================================================


events Record:
ERROR ON exec_query() - database.class.php
1146 - Table 'testlink_19b4.Transactions' doesn't exist - SELECT E.id FROM events E JOIN Transactions T ON T.id = E.transaction_id AND T.user_id IN (9) WHERE log_level IN (16) ORDER BY transaction_id DESC,fired_at DESC
THE MESSAGE : SQL [284] executed [took 0.0004 secs][all took 0.1406 secs]: SELECT E.id FROM events E JOIN Transactions T ON T.id = E.transaction_id AND T.user_id IN (9) WHERE log_level IN (16) ORDER BY transaction_id DESC,fired_at DESC Query failed: errorcode[1146] errormsg:Table 'testlink_19b4.Transactions' doesn't exist
Steps To Reproduceon testlink 1.9b4 or 1.9b5 click on events, select a user and click on apply
Additional Information i am using testlink 1.9 b5 Frontend with an 1.9 b4 Database
(which should not be the reason for that because there were no changes in DB between these versions).
to be sure I also tried it on 1.9 b4 - the same error comes up.
TagsNo tags attached.
Database (MySQL,Postgres,etc)MySQL on Ubuntu
Browserfirefox
PHP Version
TestCaseID
QA Team - Task Workflow Status
Attached Fileszip file icon fix-3656.zip [^] (7,909 bytes) 2010-08-08 19:00

- Relationships
child of 0003570closedfman Availables Fixes for 1.9 Beta 5 

-  Notes
(0010804)
fman (administrator)
2010-08-05 18:32

thanks
(0010819)
fman (administrator)
2010-08-08 19:01

please
1. add DB type you are using
2. use attached fix and let us know
(0010821)
brainbug (reporter)
2010-08-09 08:38

1. mySql Server Version: 5.0.67-0ubuntu6
2. yep, now it works.

Thanks!
(0011095)
fman (administrator)
2010-08-31 20:27

Release BETA 6 - 20100831

- Issue History
Date Modified Username Field Change
2010-08-05 16:01 brainbug New Issue
2010-08-05 18:32 fman Note Added: 0010804
2010-08-05 18:32 fman Assigned To => fman
2010-08-05 18:32 fman Status new => assigned
2010-08-08 19:00 fman File Added: fix-3656.zip
2010-08-08 19:01 fman Note Added: 0010819
2010-08-09 08:38 brainbug Note Added: 0010821
2010-08-09 10:06 fman Database => MySQL on Ubuntu
2010-08-09 10:07 fman Relationship added child of 0003570
2010-08-09 10:08 fman Status assigned => resolved
2010-08-09 10:08 fman Fixed in Version => 1.9 Beta 6
2010-08-09 10:08 fman Resolution open => fixed
2010-08-31 20:27 fman Note Added: 0011095
2010-08-31 20:27 fman Status resolved => closed



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker