#22769 closed Bug (needsinfo)
transaction.automic is not working as expected with Oracle DB for raw sql
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.6 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
We have an usecase to store Blob data to DB. We are using raw sql to do that. We are wrapping method having this code with transaction.atomic decorator. The scenario work fine for MySQL database, but it fails with oracle DB. It works fine if we use self.connection.commit() explicit inside the method.
Attachments (1)
Change History (7)
comment:1 by , 11 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
comment:2 by , 11 years ago
Added code sample which is failing. Note : Instead of using @transaction.atomic if we put explicit commit i.e. self.connection.commit(), everything works fine.
comment:3 by , 11 years ago
Resolution: | needsinfo |
---|---|
Status: | closed → new |
comment:4 by , 11 years ago
A few questions...
- When you're testing on MySQL, are you using the MyISAM or the InnoDB storage engine? (Since MyISAM doesn't support transactions, that would make the comparison irrelevant.)
- Where is
self.cursor
coming from in your example? - Are you using more than one database?
comment:5 by , 11 years ago
we support multiple database but at a time only one will be available for single installation. self.cursor is class variable where we have this mentioned method.
comment:6 by , 11 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
I'm sorry, but it's hard to help when you're answering only half of my questions and you aren't giving enough information for me to reproduce your problem.
If you provide a standalone piece of code that I can run and that has a different transactional behavior on MySQL + InnoDB and on Oracle, then I'll fix it.
(Please remember that I'm working on my free time to help you do you paid job.)
Hi,
We'd appreciate a little more details about this. A code sample that works with MySql and fails with Oracle will be nice.
When adding more details, please reopen the bug.
Thanks,
Shai.