Opened 15 years ago

Last modified 7 years ago

#5553 new enhancement

SQL Syntax from plugin will be broken if MySQL is used — at Version 1

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

Description (last modified by Ryan J Ollos)

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.

Change History (2)

Changed 15 years ago by radu.micu@…

Attachment: model.py added

model.py updated

comment:1 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)
Note: See TracTickets for help on using tickets.