Modify

Opened 12 years ago

Closed 7 years ago

Last modified 7 years ago

#9517 closed defect (fixed)

SQL syntax error

Reported by: lxbzmy@… Owned by: Ryan J Ollos
Priority: normal Component: BudgetingPlugin
Severity: critical Keywords: sql db
Cc: Trac Release: 0.12

Description

ProgrammingError: (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 '../milestone/' || t.milestone AS __grouplink__, \n t.owner, t.reporter, t.stat' at line 1")

And I think the error because special char in AS Schätzung and the plugin can not create table automaticly

Attachments (0)

Change History (15)

comment:1 Changed 12 years ago by Franz

You might be right that this is the root problem. At least "schätzung" should be translated anyway.

But have you checked if your database has configured with UTF-8 (or at least latin-1)? This should work as well.

comment:2 Changed 12 years ago by riot

I have the same problem (with exactly the same message) here without Umlaut (Ä) and my database is UTF-8. trac-admin upgrade tells me, my db were up to date.

I've tried BudgetingPlugin-0.5.a3 with a 0.12.3dev-r10867 Trac.

comment:3 Changed 12 years ago by lxbzmy @…

the sql can run in mysql workbench. So the problem maybe mysql python driver problem

comment:4 Changed 12 years ago by Franz

(In [10989]) refs #9517: changing version number, to indicate if it is compatible with Trac 0.13 or Trac 0.12; adding files for translation

comment:5 Changed 12 years ago by Franz

(In [10991]) refs #9517: changing version number, to indicate that this version is only compatible with Trac 0.12; removed German umlaut

comment:6 Changed 12 years ago by Franz

I reorganized the sources a bit, so now Budgeting 0.5.x is indicating that it should work on Trac 0.12; in 0.5.a4 (see BudgetingPlugin page for download) I removed the umlaut, so this problem should not occur anymore.

We are currently using Trac 0.13dev-r10854 and thus Budgeting_Plugin-0.6.0; there the umlaut is still checked in.

comment:7 Changed 12 years ago by anonymous

Having the same error with 0.13dev-r11037 and plugin 0.60. This is on MySQL 5.5.3 with UTF8 tables. Thoughts?

comment:8 in reply to:  7 Changed 12 years ago by Franz

Replying to anonymous:

Having the same error with 0.13dev-r11037 and plugin 0.60. This is on MySQL 5.5.3 with UTF8 tables. Thoughts?

Could you please try version 0.5.a4 (should work with Trac 0.13dev as well). The main difference is that in version 0.5.a4 the German Umlaut is removed, which I suppose is the root cause of this problem (see http://trac-hacks.org/changeset/10991#file3)

comment:9 Changed 12 years ago by anonymous

Thanks -- tried 0.5.4a with Trac 0.13 and now trying to open a ticket gives this:

Trac detected an internal error: AttributeError:

Yes, an empty string for the error which isn't hugely helpful! Log just shows a 500 on the request. Any dthoughts?

comment:10 in reply to:  9 Changed 12 years ago by Franz

Replying to anonymous:

Thanks -- tried 0.5.4a with Trac 0.13 and now trying to open a ticket gives this:

Trac detected an internal error: AttributeError:

Yes, an empty string for the error which isn't hugely helpful! Log just shows a 500 on the request. Any dthoughts?

An empty error message is really not helpful. Maybe setting log level to INFO or DEBUG would help?

Two things:

  • I remember that at the very first request on ticket / newticket the plugin creates database tables and such; and at this point it (sometimes ?) breaks, but at second request everything is ok
  • maybe it's really a driver problem as stated in comment:3

Maybe you could insert some more logging into the code, so you get a more precise error message (or at least you know where the error is caused).

comment:11 Changed 12 years ago by Franz

Keywords: sql db added
Summary: sql syntax error in 0.5SQL syntax error

Ticket #10061 might also be the same problem.

comment:12 Changed 11 years ago by ross@…

Severity: normalcritical

I'm getting the exact same error using Budgeting_Plugin-0.5.a4-py2.6.egg and trac 0.12. The budgeting table was not created in the database and the problem doesn't go away on a second reload of /newticket. I'm raising the severity of this ticket to 'critical' as it renders the plugin and, if installed, ticketing useless.

comment:13 Changed 7 years ago by Ryan J Ollos

Owner: changed from Franz to Ryan J Ollos
Status: newaccepted

comment:14 Changed 7 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 16151:

0.6.6dev: Fix string interpolation in SQL statements

Fixes #9517.

comment:15 Changed 7 years ago by Ryan J Ollos

In 16153:

0.6.6dev: Fix regression in r16151

Refs #9517.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
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.