~evarlast/ubuntu/utopic/mongodb/upstart-workaround-debian-bug-718702

« back to all changes in this revision

Viewing changes to src/mongo/db/queryoptimizercursor.h

  • Committer: Package Import Robot
  • Author(s): James Page, James Page, Robie Basak
  • Date: 2013-05-29 17:44:42 UTC
  • mfrom: (44.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20130529174442-z0a4qmoww4y0t458
Tags: 1:2.4.3-1ubuntu1
[ James Page ]
* Merge from Debian unstable, remaining changes:
  - Enable SSL support:
    + d/control: Add libssl-dev to BD's.
    + d/rules: Enabled --ssl option.
    + d/mongodb.conf: Add example SSL configuration options.
  - d/mongodb-server.mongodb.upstart: Add upstart configuration.
  - d/rules: Don't strip binaries during scons build for Ubuntu.
  - d/control: Add armhf to target archs.
  - d/p/SConscript.client.patch: fixup install of client libraries.
  - d/p/0010-install-libs-to-usr-lib-not-usr-lib64-Closes-588557.patch:
    Install libraries to lib not lib64.
* Dropped changes:
  - d/p/arm-support.patch: Included in Debian.
  - d/p/double-alignment.patch: Included in Debian.
  - d/rules,control: Debian also builds with avaliable system libraries
    now.
* Fix FTBFS due to gcc and boost upgrades in saucy:
  - d/p/0008-ignore-unused-local-typedefs.patch: Add -Wno-unused-typedefs
    to unbreak building with g++-4.8.
  - d/p/0009-boost-1.53.patch: Fixup signed/unsigned casting issue.

[ Robie Basak ]
* d/p/0011-Use-a-signed-char-to-store-BSONType-enumerations.patch: Fixup
  build failure on ARM due to missing signed'ness of char cast.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    class CandidatePlanCharacter;
28
28
    
29
29
    /**
30
 
     * An interface for policies overriding the query optimizer's default query plan selection
31
 
     * behavior.
 
30
     * An interface for policies overriding the query optimizer's default behavior for selecting
 
31
     * query plans and creating cursors.
32
32
     */
33
33
    class QueryPlanSelectionPolicy {
34
34
    public:
37
37
        virtual bool permitOptimalNaturalPlan() const { return true; }
38
38
        virtual bool permitOptimalIdPlan() const { return true; }
39
39
        virtual bool permitPlan( const QueryPlan &plan ) const { return true; }
40
 
        virtual BSONObj planHint( const char *ns ) const { return BSONObj(); }
 
40
        virtual BSONObj planHint( const StringData& ns ) const { return BSONObj(); }
 
41
 
 
42
        /**
 
43
         * @return true to request that a created Cursor provide a matcher().  If false, the
 
44
         * Cursor's matcher() may be NULL if the Cursor can perform accurate query matching
 
45
         * internally using a non Matcher mechanism.  One case where a Matcher might be requested
 
46
         * even though not strictly necessary to select matching documents is if metadata about
 
47
         * matches may be requested using MatchDetails.  NOTE This is a hint that the Cursor use a
 
48
         * Matcher, but the hint may be ignored.  In some cases the Cursor may not provide
 
49
         * a Matcher even if 'requestMatcher' is true.
 
50
         */
 
51
        virtual bool requestMatcher() const { return true; }
 
52
 
 
53
        /**
 
54
         * @return true to request creating an IntervalBtreeCursor rather than a BtreeCursor when
 
55
         * possible.  An IntervalBtreeCursor is optimized for counting the number of documents
 
56
         * between two endpoints in a btree.  NOTE This is a hint to create an interval cursor, but
 
57
         * the hint may be ignored.  In some cases a different cursor type may be created even if
 
58
         * 'requestIntervalCursor' is true.
 
59
         */
 
60
        virtual bool requestIntervalCursor() const { return false; }
41
61
        
42
62
        /** Allow any query plan selection, permitting the query optimizer's default behavior. */
43
63
        static const QueryPlanSelectionPolicy &any();
76
96
    public:
77
97
        virtual string name() const { return "idElseNatural"; }
78
98
        virtual bool permitPlan( const QueryPlan &plan ) const;
79
 
        virtual BSONObj planHint( const char *ns ) const;
 
99
        virtual BSONObj planHint( const StringData& ns ) const;
80
100
    };
81
101
    
82
102
    class FieldRangeSet;