#13648 closed Bug (fixed)
'%s' escaping support for sqlite3
Reported by: | master | Owned by: | Luke Plant |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Release blocker | Keywords: | sqlite escape |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Somewhere between 1.2beta1 and svn r13307, the string processing of convert_query() changed.
Now the regex to escape '%%s' content for sqlite3 SQL is wrong and produces '%?'.
It doesn't throw any exception but it means nothing to the DB and you may have 'None' column values returned.
Note : for a complete working sqlite solution, you still have to apply the patch in #12268.
Attachments (3)
Change History (14)
by , 15 years ago
Attachment: | sqlite3_base_%s.diff added |
---|
comment:1 by , 14 years ago
Owner: | changed from | to
---|
by , 14 years ago
Attachment: | all_patches.patch added |
---|
comment:2 by , 14 years ago
Has patch: | unset |
---|---|
Patch needs improvement: | set |
Triage Stage: | Unreviewed → Accepted |
Added a patch with a test. The change patch uploaded by *master* makes the query works.
BUT, there is a problem that I wasn't able to found, that the returned value isn't the value returned by sqllite.
To test the value of sqllite, y made a simple case:
sqlite3 path.sql
sqlite> select strftime("%s", '2010-11-13', 'utc');
1289617200
comment:3 by , 14 years ago
Owner: | removed |
---|
comment:4 by , 14 years ago
#15155 was a duplicate and contains a similar fix for this issue alone plus tests (latest patch for this ticket also has tests but it mixes a fix for another issue).
by , 14 years ago
Attachment: | sqlite_base_with_test.diff added |
---|
a fix for just this issue; based on the fix from #15155
comment:5 by , 14 years ago
comment:6 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → Bug |
comment:8 by , 14 years ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
comment:9 by , 14 years ago
Severity: | Normal → Release blocker |
---|
This is a regression and needs to be backported. Since it really ought to have been fixed before 1.3.X, it ought to have been backported to 1.2.X as well, and there is still a case for doing that.
The patch of the #12268 and #13648, and a test