Modify

Opened 2 years ago

Last modified 5 months ago

#9517 new defect

SQL syntax error

Reported by: lxbzmy@… Owned by: framay
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 (12)

comment:1 Changed 2 years ago by framay

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 2 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 2 years ago by lxbzmy @…

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

comment:4 Changed 2 years ago by framay

(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 2 years ago by framay

(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 2 years ago by framay

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 follow-up: Changed 2 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 2 years ago by framay

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 follow-up: Changed 2 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 2 years ago by framay

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 23 months ago by framay

  • Keywords sql db added
  • Summary changed from sql syntax error in 0.5 to SQL syntax error

Ticket #10061 might also be the same problem.

comment:12 Changed 15 months ago by ross@…

  • Severity changed from normal to critical

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.

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.