Opened 12 years ago

Closed 10 years ago

Last modified 10 years ago

#20420 closed Cleanup/optimization (fixed)

Different query counts under Oracle when savepoints are involved

Reported by: Aymeric Augustin Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This is a follow-up on #20387, see comments 5 and 6.

In short, Oracle doesn't have RELEASE SAVEPOINT, which means transaction.commit_savepoint() doesn't do anything. As a consequence, connection.queries contains one less entry under Oracle than under other databases.

#20387 was fixed by hardcoding the difference into the tests. This ticket is about finding a more robust solution to the general problem.

Change History (4)

comment:2 by Aymeric Augustin <aymeric.augustin@…>, 10 years ago

Resolution: fixed
Status: newclosed

In 40bfd8561d016f6632c95d03e46a720571ad1a8a:

Fixed #20420 -- Normalized query counts on Oracle.

This is achieved by inserting a fake entry in connection.queries when
not releasing a savepoint (since Oracle doesn't support that operation.)

Also removed the can_release_savepoints feature that was recently added,
but is superseded by this solution.

comment:3 by Aymeric Augustin <aymeric.augustin@…>, 10 years ago

In 5cde9a7018021fc3c005e4ebcfa63967bcf56285:

[1.7.x] Fixed #20420 -- Normalized query counts on Oracle.

This is achieved by inserting a fake entry in connection.queries when
not releasing a savepoint (since Oracle doesn't support that operation.)

Also removed the can_release_savepoints feature that was recently added,
but is superseded by this solution.

Backport of 40bfd856 from master.

comment:4 by Tim Graham <timograham@…>, 10 years ago

In 84714dfed726212122ac9a143ddbe6719dac5884:

[1.7.x] Fixed test failures due to refs #20420.

cfcca7ccce3dc527d16757ff6dc978e50c4a2e61 renamed connection.queries
to queries_log and this wasn't backported to stable/1.7.x.

Note: See TracTickets for help on using tickets.
Back to Top