Modify

Opened 17 years ago

Closed 17 years ago

#1697 closed defect (invalid)

Hour reports not working with Trac 10.4 & MySQL 5.0

Reported by: duckie@… Owned by: Russ Tyndall
Priority: normal Component: TimingAndEstimationPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

E.g. when opening 'ticket hours grouped by component' report the following error message appears:

Report execution failed: (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 'REAL) as Estimated_work,\n CAST(totalhours.value as REAL) as Total_work,\n ' at line 11")

This error seems to be related to the fact that MySQL doesn't support casting to REAL. (http://dev.mysql.com/doc/refman/5.0/en/differences-from-ansi.html).

I haven't had time to test it yet but I guess the problem could be solved by replacing REAL with DECIMAL.

Attachments (1)

Il bisbetico domato.srt (69.5 KB) - added by anonymous 16 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 17 years ago by Russ Tyndall

Hrmmm...

I was really hoping that we had finally worked up reports that were reliably cross database </grumble>.

I just tested casting as decimal in sqlite, mysql5, and a recent version of postgres and it worked so I will change the reports, and post a new version of the plugin in a few moments (it will show up in this log when I do).

Thanks for the good bug report,

Russ

comment:2 Changed 17 years ago by Russ Tyndall

(In [2331]) re #1697

Changed REAL to DECIMAL in all reports and bumped the version number up to 0.4.2

comment:3 Changed 17 years ago by anonymous

Resolution: fixed
Status: newclosed

comment:4 Changed 17 years ago by anonymous

Resolution: fixed
Status: closedreopened

MySQL 5.0 does not like the "CAST(t.id as text) as ticket" in developers work summary.

Fixed by changing to "t.id as ticket" which is used also in milestone work summary

comment:5 Changed 17 years ago by anonymous

Your fix will not work for strongly typed databases (read postgres) because it wants the union to be of the same type. I will attempt to find a valid cross database type to cast to.

I may not get to this for a few days. Thanks for the bug report,

Russ

comment:6 Changed 17 years ago by Russ Tyndall

Resolution: fixed
Status: reopenedclosed

closes #1697 I was wrong about this, It was just a leftover quirk and has been removed

closes #901 reports now contain time remaining

closes #1958 added case statements all over the place to better support postegres when there are null/empty values

closes #1959 changed the work summary report to include links to the ticket and ticket summaries

Now at version 0.4.9

comment:7 Changed 17 years ago by idbill@…

Resolution: fixed
Status: closedreopened

I am having this problem.

What was the fix?

Trac 0.10.4 + mySQL 5.0.48 + TimeAndEstimationPlugin 0.4.9

Bill

comment:8 Changed 17 years ago by anonymous

Resolution: invalid
Status: reopenedclosed

nm this isn't a cast issue... but a problem with mysql5.0 nevertheless.

Changed 16 years ago by anonymous

Attachment: Il bisbetico domato.srt added

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Russ Tyndall.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.