Modify

Opened 5 years ago

Last modified 3 years ago

#5553 new enhancement

SQL Syntax from plugin will be broken if MySQL is used

Reported by: RaduM Owned by: peca
Priority: high Component: TracDownloaderPlugin
Severity: major Keywords:
Cc: Trac Release: 0.11

Description (last modified by rjollos)

Hi there if you use MySQL with Trac and this plugin all the SQL syntax will be broken and needs to be changed.

For example:

cursor.execute("SELECT id, name, notes, sort, timestamp, deleted "
               "FROM downloader_category "
               "WHERE id = %s", (id,))

This will break near id = %s because you need to specify the table where ID resides. Something like this:

cursor.execute("SELECT id, name, notes, sort, timestamp, deleted "
               "FROM downloader_category "
               "WHERE downloader_category.id = %s", (id,))

I have changed all the syntax and now works ok.

Attachments (1)

model.py (45.3 KB) - added by radu.micu@… 5 years ago.
model.py updated

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by radu.micu@…

model.py updated

comment:1 Changed 3 years ago by rjollos

  • Description modified (diff)

comment:2 Changed 3 years ago by rjollos

  • Description modified (diff)

Add Comment

Modify Ticket

Action
as new The owner will remain peca.
Author


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

 
Note: See TracTickets for help on using tickets.