Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#10864 closed defect (fixed)

Syntax error, or simply wrong version?

Reported by: hopfrog@… Owned by: Gasler Radu
Priority: normal Component: WikiReplacePlugin
Severity: normal Keywords: glob 0.12.3 syntax
Cc: Trac Release: 0.12

Description (last modified by Ryan J Ollos)

Hi, we installed WikiReplacePlugin 1.1.1 on our 0.12.3 TRAC system and got the following error when trying a replace from the Administration web page:

Trac detected an internal error:

ProgrammingError: syntax error at or near "glob"
LINE 1: ... w2.max_version AND = AND glob E'Wik... ^

Is there a way of getting the plugin to work with 0.12.3?

Attachments (1)

error.txt (9.9 KB) - added by hopfrog@… 4 years ago.
Python trackback & system information

Download all attachments as: .zip

Change History (12)

comment:1 Changed 4 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 4 years ago by Ryan J Ollos

What were your find/replace/wiki pages terms?

comment:3 Changed 4 years ago by hopfrog@…

Find: 'Locate' Replace with: 'Find' Page: 'WikiStart'

I entered these without the quotation marks, of course.

Changed 4 years ago by hopfrog@…

Attachment: error.txt added

Python trackback & system information

comment:4 Changed 4 years ago by hopfrog@…

Tried again using S='Quest' - R='Pest' - P='Shareplex'

same error, attaching Python traceback & system information

comment:5 Changed 4 years ago by Gasler Radu


I commited a fix attempt for your problem. It might be an sql case sensitivity issue.

Please try again.

comment:6 Changed 4 years ago by Ryan J Ollos

I'm not sure what to do with GLOB, or if it will even cause a problem, but t:TracDev/DatabaseApi#GuidelinesforSQLStatements described how LIKE should be handled for cross-db compatibility:

It would look something like this (or perhaps exactly like this if I haven't made a stupid error typing this out) :

sql = 'SELECT w1.version,,w1.text' + sqlbase + 'AND GLOB %%s AND w1.text %s %%s' %

comment:7 Changed 4 years ago by Jun Omae

GLOB operator is available only on SQLite and case-sensitive. LIKE operator on SQLite is case-insensitve.

Also, the method generates case-insensitive LIKE clause on all database backends. e.g.

comment:8 Changed 4 years ago by Gasler Radu

Thank you all for the suggestions!

I've just committed this fix: [12617]

Can you please check again?

comment:9 Changed 4 years ago by Gasler Radu

Resolution: fixed
Status: newclosed

Fixed with [12617].

comment:10 Changed 4 years ago by hopfrog@…

Tested successfully - thank you very much!

comment:11 Changed 4 years ago by hopfrog@…

Hi, as this has now been tested successfully with TRAC 0.12.3 and PostgreSQL, wouldn't it be a good idea to tag this with a new version number...? Thanks again for the fix!

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Gasler Radu.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.