~ubuntu-branches/ubuntu/utopic/mariadb-5.5/utopic-security

« back to all changes in this revision

Viewing changes to storage/tokudb/ft-index/locktree/lock_request.h

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen
  • Date: 2014-04-17 20:55:22 UTC
  • mfrom: (2.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140417205522-wof4l36nxhlkn89m
* New upstream release, fixing the following security issues:
  * Corresponding MariaDB CVEs for Oracle SPU April 2014 (Closes: #745330)
    - CVE-2014-0384 
    - CVE-2014-2419 
    - CVE-2014-2430 
    - CVE-2014-2431 
    - CVE-2014-2432 
    - CVE-2014-2436 
    - CVE-2014-2438 
    - CVE-2014-2440
* Re-enabled TokuDB with "if arch amd64" in d/rules
* Applied patch to log init output better
  (Closes https://mariadb.atlassian.net/browse/MDEV-5957)

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
        WRITE
126
126
    };
127
127
 
128
 
    // effect: Initializes a lock request with a given wait time.
129
 
    void create(uint64_t wait_time);
 
128
    // effect: Initializes a lock request.
 
129
    void create(void);
130
130
 
131
131
    // effect: Destroys a lock request.
132
132
    void destroy(void);
133
133
 
134
134
    // effect: Resets the lock request parameters, allowing it to be reused.
135
135
    // requires: Lock request was already created at some point
136
 
    void set(locktree *lt, TXNID txnid,
137
 
            const DBT *left_key, const DBT *right_key, type lock_type);
 
136
    void set(locktree *lt, TXNID txnid, const DBT *left_key, const DBT *right_key, type lock_type, bool big_txn);
138
137
 
139
138
    // effect: Tries to acquire a lock described by this lock request.
140
139
    // returns: The return code of locktree::acquire_[write,read]_lock()
144
143
    // effect: Sleeps until either the request is granted or the wait time expires.
145
144
    // returns: The return code of locktree::acquire_[write,read]_lock()
146
145
    //          or simply DB_LOCK_NOTGRANTED if the wait time expired.
147
 
    int wait(void);
 
146
    int wait(uint64_t wait_time_ms);
 
147
    int wait(uint64_t wait_time_ms, uint64_t killed_time_ms, int (*killed_callback)(void));
148
148
 
149
149
    // return: left end-point of the lock range
150
150
    const DBT *get_left_key(void) const;
196
196
    int m_complete_r;
197
197
    state m_state;
198
198
 
199
 
    uint64_t m_wait_time;
200
199
    toku_cond_t m_wait_cond;
201
200
 
 
201
    bool m_big_txn;
 
202
 
202
203
    // the lock request info state stored in the
203
204
    // locktree that this lock request is for.
204
205
    struct locktree::lt_lock_request_info *m_info;
235
236
 
236
237
    void copy_keys(void);
237
238
 
238
 
    void calculate_cond_wakeup_time(struct timespec *ts);
239
 
 
240
239
    static int find_by_txnid(lock_request * const &request, const TXNID &txnid);
241
240
 
242
241
    friend class lock_request_unit_test;