Roundup Tracker - Issues

Issue 1611789

classification
mysql backend uses 'int' for boolean values
Type: Severity: normal
Components: Database Versions:
process
Status: closed wont fix
:
: richard : a1s, richard, stefan
Priority: normal :

Created on 2006-12-08 19:44 by stefan, last changed 2006-12-12 14:00 by stefan.

Messages
msg2368 Author: [hidden] (stefan) Date: 2006-12-08 19:44
mysql appears to use (and report !) int for booleans,
which is visible to users.
(e.g.  db.myclass.get(id, bool_prop))

The layer above should make sure the same types are
reported no matter the backend.
msg2369 Author: [hidden] (richard) Date: 2006-12-11 23:16
We can't return Boolean type values from the hyperdb without breaking Python 2.1 compatibility.

If there's some user-level problem that might be addressed, please give some specifics.
msg2370 Author: [hidden] (stefan) Date: 2006-12-12 03:28
I'm not suggesting the returned value should have the python boolean type.
Rather, I'm saying that the hyperdb should return the same type, no matter
the backend.
msg2371 Author: [hidden] (a1s) Date: 2006-12-12 05:48
roundup requires python 2.3 since version 0.8b3.  compatibility with python 2.1 is not an issue.
msg2372 Author: [hidden] (richard) Date: 2006-12-12 08:53
Ahah! I knew I should've checked before I posted that ;)

Stefan: I'm still a little confused as to exactly what you're observing.
msg2373 Author: [hidden] (stefan) Date: 2006-12-12 14:00
Let me quote the person who send me the bug originally:

"The MySQL backend returns "int" values for boolean properties, while the
AnyDBM backend returns "bool" values.  For example:

  db.myclass.get(id, bool_prop)

will have different types depending on the back ends, at least in our
version of Roundup.  That seems undesirable; returning bool values
everywhere would make more sense."

HTH,
     Stefan
History
Date User Action Args
2006-12-08 19:44:31stefancreate