Modify

Opened 17 years ago

Closed 17 years ago

Last modified 16 years ago

#2497 closed defect (fixed)

MySQL 5.0 Compatibility

Reported by: macgngsta Owned by: Russ Tyndall
Priority: normal Component: TimingAndEstimationPlugin
Severity: normal Keywords: MESSAGE
Cc: Brooklyn Trac Release: 0.10

Description

When running management > reports the error

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 'VARCHAR(1024)) as owner,\n SUM(CASE WHEN EstimatedHours.value = OR Es' at line 45")

I believe it is due to the Posgres sql case changes made in revision 2590. When reverting back to revision 2538 MySQL reports work fine.

Attachments (0)

Change History (9)

comment:1 Changed 17 years ago by macgngsta

For the Ticket Hours with Description MySQL 5.0 seems to not like --, as a comment and will throw an error. I've modified the reports.py to read

SELECT color, style, ticket, summary, component ,version, severity,

milestone, status, owner, Estimated_work, Total_work, billable,_description_ ,_ord

-- created, modified, -- ## Dates are formatted -- _changetime, -- _reporter

comment:2 Changed 17 years ago by anonymous

I'm still having this problem. What's the solution?

comment:3 Changed 17 years ago by Russ Tyndall

Sorry I will try to get to this today.

comment:4 Changed 17 years ago by Russ Tyndall

I have test case statements and I comments and casting as:

SELECT
  CASE WHEN '' = '' THEN 0
  ELSE CAST( '3' AS DECIMAL )
END AS newvalue,
CASE WHEN '3' = '' THEN 0
  ELSE CAST( '3' AS DECIMAL )
END AS newvalue2 

This works fine in mysql 5.


I dont have a mysql 5 trac install. If you could point out what (beside the --## comment structure needs to be changed about these reports, it would greatly ease the task of making this mysql5 compatible.

Thanks for your help and understanding,

Russ

comment:5 Changed 17 years ago by Russ Tyndall

I can execute the reports other than the one with the malformed(for mysql) comment (Ticket Hours With Description).

If you have any more information about how this is breaking please update the ticket.

comment:6 in reply to:  4 Changed 17 years ago by Russ Tyndall

Replying to bobbysmith007:

I have test case statements and I comments and casting as:

Sorry about this bit of gibberish. I was trying to say that I had tested case statements with casting and that seems to work.

comment:7 Changed 17 years ago by Russ Tyndall

Resolution: fixed
Status: newclosed

Well I think this is fixed. (Since I can execute the reports in MySql 5. If I am wrong please reopen.

Thanks,

Russ

comment:8 Changed 16 years ago by zodiaclove

Cc: Brooklyn added; anonymous removed
Keywords: MESSAGE added

yo I can't agree with what you said really.... please explain in detail a bit more for me ;D thanks

comment:9 Changed 16 years ago by Russ Tyndall

Um this has been closed for over six months... Could you please describe what error you are having on what reports, preferably with some accompanying TracLogging.

Thanks, Russ

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.