uuid does not work
Bug #691752 reported by
wrobell
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Storm |
Fix Released
|
Medium
|
Jamu Kakar |
Bug Description
while uuid support was added to storm over a year ago it still does not work
- it is not exposed via storm.locals
- using UUID from storm.properties gives following error when saving to postgres database
psycopg2.DataError: invalid input syntax for uuid: "\x353961303865
LINE 1: INSERT INTO contest (id, name) VALUES (E'\\x353961303
storm 0.18
psycopg 2.0.12
postgresql 9.0.1
Related branches
lp://staging/~jkakar/storm/uuid-bug-fixes
- Thomas Herve (community): Approve
- James Henstridge: Approve
-
Diff: 120 lines (+25/-5)6 files modifiedstorm/locals.py (+1/-1)
storm/variables.py (+1/-1)
tests/store/base.py (+14/-2)
tests/store/mysql.py (+5/-1)
tests/store/postgres.py (+2/-0)
tests/store/sqlite.py (+2/-0)
Changed in storm: | |
importance: | Undecided → Medium |
milestone: | none → 0.19 |
status: | New → Confirmed |
Changed in storm: | |
assignee: | nobody → Jamu Kakar (jkakar) |
status: | Confirmed → In Progress |
Changed in storm: | |
status: | In Progress → Fix Committed |
Changed in storm: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This looks like it is related to bug 585704.
UUIDVariable. parse_get( ) converts the value to a byte string, which then gets wrapped in a psycopg2.Binary(), which with modern versions of psycopg2 interpolate with a bytea cast. The code should be returning a unicode string instead, since it is a textual representation of the UUID.
The fact that I didn't pick this up when fixing the other related issues would indicate that the test coverage is lacking.