2 messages in com.mysql.lists.eventum-usersRe: malformed sql operations| From | Sent On | Attachments |
|---|---|---|
| Tibor Gellert | 28 Nov 2006 02:48 | |
| Bryan Alsdorf | 26 Dec 2006 08:58 |
| Subject: | Re: malformed sql operations![]() |
|---|---|
| From: | Bryan Alsdorf (bry...@mysql.com) |
| Date: | 12/26/2006 08:58:40 AM |
| List: | com.mysql.lists.eventum-users |
Hi Tibor,
I have been unable to reproduce this, I spent some time messing around with it to no avail. Here is my suggestion to add debug information.
In update.php, pass $issue_id as the second parameter to getColList() and in class.issue.php change getColList to have this in the error handler.
ob_start();var_dump($issue_id);$dump = ob_get_contents();ob_end_clean(); Error_Handler::logError(array("$dump\n\n" . $res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
This should put the value of issue ID in the error message which will let us figure out how it is getting past the check if issue ID is empty.
Best Regards, /bryan
Tibor Gellert wrote:
Hi Bryan,
Occasionally I receive strange error report like the one below. You see that the AND part is missing the right side of the "iss_id<>" expression. This is not the only SQL code I get this strange behavior. Seems to me the original caller may had the value passed in the call chain but somehow the value got lost. Reviewing the code this should not happen, but then I see the result like this below.
I experienced at another case that, for instance, de-associating a custom field from a project (which has project code less than 10) will delete the custom field values from ALL projects accidently - due to the same malformed SQL as like above. However if I de-associate from project where the project code is equal or greater than 10 the value removal will work fine and removes only custom field values belonging to that particular project.
Do you have idea whats going on here? What kind of Eventum/etc logging I could enable to track this down? I suspect the step when a value is taken through the web interface.
Thanks Tibor
-------- Original Message -------- Subject: FW: Eventum - Error found! - 10/17/2006 17:13:20 Date: Tue, 17 Oct 2006 17:14:42 +0100 From: Tracker Eventum Admin <Trac...@openet-telecom.com> To: Tibor Gellert <Tibo...@openet-telecom.com>
------------------------------------------- *From:* even...@openet-telecom.com[SMTP:EVEN...@OPENET-TELECOM.COM] *Sent:* Tuesday, October 17, 2006 5:13:20 PM *To:* Tracker Eventum Admin *Subject:* Eventum - Error found! - 10/17/2006 17:13:20 *Auto forwarded by a Rule*
Hello,
An error was found at 10/17/2006 17:13:20 (1161101600) on line '3242' of script '/srv/www/htdocs/prod_eventum/include/class.issue.php'.
The error message passed to us was:
'DB Error: syntax error'
A more detailed error message follows:
'SELECT iss_id FROM eventum_prod.issue WHERE iss_prj_id=31 AND iss_id <> ORDER BY iss_id DESC [nativecode=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 'ORDER BY
iss_id DESC' at line 7]'
That happened on page '/eventum/update.php' from IP Address '10.0.2.34' coming from the page (referrer) 'http://robin/eventum/switch.php' <http://robin/eventum/switch.php%27>.
The user agent given was 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7'.
Sincerely yours, Automated Error_Handler Class
A backtrace is available:
Array ( [0] => Array ( [file] => /srv/www/htdocs/prod_eventum/update.php [line] => 107 [function] => getcollist [class] => issue [type] => :: [args] => Array ( [0] => iss_id <> )
)
)
-- Bryan Alsdorf, Manager of Support Systems MySQL AB, www.mysql.com
Are you MySQL certified? www.mysql.com/certification




