Opened 13 years ago

Closed 13 years ago

#18334 closed Bug (fixed)

BaseDatabaseOperations._supports_stddev prevents enabling supports_stddev

Reported by: Michael Manfre Owned by: Claude Paroz
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords: stddev
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

BaseDatabaseOperations._supports_stddev() doesn't return a value, which disables supports_stddev for all backends, except sqlite3 (overrides it the function).

Attachments (2)

django-ticket18334.diff (600 bytes ) - added by Michael Manfre 13 years ago.
18334-2.diff (2.2 KB ) - added by Claude Paroz 13 years ago.
Test included

Download all attachments as: .zip

Change History (9)

by Michael Manfre, 13 years ago

Attachment: django-ticket18334.diff added

comment:1 by Michael Manfre, 13 years ago

I haven't checked previous versions to see when this broke.

comment:2 by Claude Paroz, 13 years ago

Needs tests: set
Triage Stage: UnreviewedAccepted

It would be nice to have a test for this, at least for PostgreSQL.

comment:3 by Michael Manfre, 13 years ago

Stddev tests already exist in aggregation_regress. They are currently being skipped by postgres and oracle because those backends are incorrectly reporting that supports_stddev = False.

comment:4 by Claude Paroz, 13 years ago

Owner: changed from nobody to Claude Paroz

by Claude Paroz, 13 years ago

Attachment: 18334-2.diff added

Test included

comment:5 by Claude Paroz, 13 years ago

Needs tests: unset

Just a quick check before commit?

comment:6 by Anssi Kääriäinen, 13 years ago

Triage Stage: AcceptedReady for checkin

Seems like this will fix the issue. I tested the patch on all core backends and no errors spotted, and I added an assert(False) to the stddev test and got a failure on PostgreSQL. So, LGTM.

I spotted that the SQLite test could be simplified to select stddev(1) instead of the create table - select - drop table thing. But, not this ticket's problem...

comment:7 by Claude Paroz <claude@…>, 13 years ago

Resolution: fixed
Status: newclosed

In [7549de841c6e0d18822af047763f5e3211539be8]:

Fixed #18334 -- Fixed detection of supports_stddev backend feature.

Thanks to Michael Manfre for the report and Anssi Kääriäinen for the
review.

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