Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002663TestLinkDatabase Generalpublic2009-06-25 17:032010-05-01 20:34
ReporterEloff 
Assigned Tofman 
PrioritynormalSeverityfeature requestReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Fixed in Version1.9 Beta 2 
Summary0002663: Show stack trace on SQL error to easier find the bad code
DescriptionWhen SQL errors occurs displaying result of debug_print_backtrace(), can be useful.
TagsNo tags attached.
Database (MySQL,Postgres,etc)
Browser
PHP Version
TestCaseID
QA Team - Task Workflow Status
Attached Filespatch file icon 015_enable_stacktrace_on_sql_error.patch [^] (609 bytes) 2009-06-25 17:03 [Show Content]

- Relationships

-  Notes
(0008623)
mhavlat (reporter)
2010-01-11 06:53

Erik, is it for CVS head?
(0008634)
Eloff (reporter)
2010-01-11 21:27

Yes, it is. Or rather was... 6 months ago
(0008637)
fman (administrator)
2010-01-11 23:49

lot of info is missign:

how this can be enabled / disabled ?
this info must be displayed allways ?

this is useful only for developement => can be solved adding debug code instead of new feature

More if added info on each query regarding class and method, when sql fails you can get idea of where to look for . (this has been implemented in several method using a var named $debugMsg)
(0008639)
Eloff (reporter)
2010-01-12 00:09

> how this can be enabled / disabled ?
> this info must be displayed allways ?
Always enabled, only executed when a query fails.

> this is useful only for developement => can be solved adding debug code instead of new feature
Can also be useful for users submitting bugs.

> More if added info on each query regarding class and method, when sql fails you can get idea of where to look for . (this has been implemented in several method using a var named $debugMsg)

This (very old) patch gives a stack trace when a database query fails.

The problem this solves is when a (to the developer unknown) query fails. It can be very hard finding the source of it. The stack trace makes it easy to find without putting debug messages all over the code.
(0008644)
fman (administrator)
2010-01-12 05:46

OK we can add this patch.
Anyway $debugMsg MUST BE added on each sql sentence (will be part of new development standard).
(0008647)
fman (administrator)
2010-01-12 18:35

using debugMsg has no drawbacks, comment is inserted on SQL CODE, then can be useful whe you print sql statement for some debugging purpose => has to be used.

- Issue History
Date Modified Username Field Change
2009-06-25 17:03 Eloff New Issue
2009-06-25 17:03 Eloff File Added: 015_enable_stacktrace_on_sql_error.patch
2010-01-11 06:53 mhavlat Note Added: 0008623
2010-01-11 06:53 mhavlat Status new => feedback
2010-01-11 21:27 Eloff Note Added: 0008634
2010-01-11 23:49 fman Note Added: 0008637
2010-01-12 00:09 Eloff Note Added: 0008639
2010-01-12 05:46 fman Note Added: 0008644
2010-01-12 06:26 fman Description Updated
2010-01-12 18:35 fman Note Added: 0008647
2010-01-12 18:36 fman Status feedback => resolved
2010-01-12 18:36 fman Fixed in Version => 1.9 (DEV)
2010-01-12 18:36 fman Resolution open => fixed
2010-01-12 18:36 fman Assigned To => fman
2010-05-01 20:34 fman Status resolved => closed



Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker