[Django] #22769: transaction.automic is not working as expected with Oracle DB for raw sql

6 views
Skip to first unread message

Django

unread,
Jun 5, 2014, 7:59:10 AM6/5/14
to django-...@googlegroups.com
#22769: transaction.automic is not working as expected with Oracle DB for raw sql
----------------------------------------------+--------------------
Reporter: manish_kumar9@… | Owner: nobody
Type: Bug | Status: new
Component: Database layer (models, ORM) | Version: 1.6
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+--------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/22769>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 5, 2014, 8:36:58 AM6/5/14
to django-...@googlegroups.com
#22769: transaction.automic is not working as expected with Oracle DB for raw sql
-------------------------------------+-------------------------------------
Reporter: manish_kumar9@… | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 1.6
(models, ORM) | Resolution: needsinfo
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by shai):

* status: new => closed
* needs_better_patch: => 0
* resolution: => needsinfo
* needs_tests: => 0
* needs_docs: => 0


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/22769#comment:1>

Django

unread,
Jun 5, 2014, 1:09:49 PM6/5/14
to django-...@googlegroups.com
#22769: transaction.automic is not working as expected with Oracle DB for raw sql
-------------------------------------+-------------------------------------
Reporter: manish_kumar9@… | Owner: nobody

Type: Bug | Status: closed
Component: Database layer | Version: 1.6
(models, ORM) | Resolution: needsinfo
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by manish_kumar9@…):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/22769#comment:2>

Django

unread,
Jun 5, 2014, 1:10:58 PM6/5/14
to django-...@googlegroups.com
#22769: transaction.automic is not working as expected with Oracle DB for raw sql
-------------------------------------+-------------------------------------

Reporter: manish_kumar9@… | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.6
(models, ORM) | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by manish_kumar9@…):

* status: closed => new
* resolution: needsinfo =>


--
Ticket URL: <https://code.djangoproject.com/ticket/22769#comment:3>

Django

unread,
Jun 5, 2014, 2:42:08 PM6/5/14
to django-...@googlegroups.com
#22769: transaction.automic is not working as expected with Oracle DB for raw sql
-------------------------------------+-------------------------------------

Reporter: manish_kumar9@… | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.6
(models, ORM) | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by aaugustin):

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?

--
Ticket URL: <https://code.djangoproject.com/ticket/22769#comment:4>

Django

unread,
Jun 6, 2014, 1:18:28 AM6/6/14
to django-...@googlegroups.com
#22769: transaction.automic is not working as expected with Oracle DB for raw sql
-------------------------------------+-------------------------------------

Reporter: manish_kumar9@… | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.6
(models, ORM) | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by manish_kumar9@…):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/22769#comment:5>

Django

unread,
Jun 6, 2014, 11:51:41 AM6/6/14
to django-...@googlegroups.com
#22769: transaction.automic is not working as expected with Oracle DB for raw sql
-------------------------------------+-------------------------------------
Reporter: manish_kumar9@… | Owner: nobody
Type: Bug | Status: closed

Component: Database layer | Version: 1.6
(models, ORM) | Resolution: needsinfo

Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* status: new => closed

* resolution: => needsinfo


Comment:

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.)

--
Ticket URL: <https://code.djangoproject.com/ticket/22769#comment:6>

Reply all
Reply to author
Forward
0 new messages