Opened 14 years ago

Closed 14 years ago

#15155 closed (duplicate)

Invalid regular expression for escaping %s substitutions in sqlite backend of django 1.2.4

Reported by: zyga Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The actual bug was discovered by zyga and fixed by apollo13 during an IRC session on #django

The issue can be reproduced by this code. Note the code sample below is using _fixed_ sqlite3 backend.

>>> from django.db import connection
>>> cursor = connection.cursor()
>>> list(cursor.execute("select strftime('%%s', date('now'))"))
[(u'1295827200',)]

The bug is caused by invalid regular expression in FORMAT_QMARK_REGEX.
I will follow-up with a patch and a test case

Attachments (1)

fix-15155.patch (1.4 KB ) - added by zyga 14 years ago.
Patch + test case

Download all attachments as: .zip

Change History (4)

by zyga, 14 years ago

Attachment: fix-15155.patch added

Patch + test case

comment:1 by Florian Apolloner, 14 years ago

Component: UncategorizedDatabase layer (models, ORM)
Has patch: set
Triage Stage: UnreviewedAccepted

comment:2 by Ramiro Morales, 14 years ago

Duplicate of #13648.

comment:3 by Ramiro Morales, 14 years ago

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top