~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to storage/innobase/include/api0misc.h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************
 
2
 
 
3
Copyright (c) 2008, 2012, Oracle and/or its affiliates. All Rights Reserved.
 
4
 
 
5
This program is free software; you can redistribute it and/or modify it under
 
6
the terms of the GNU General Public License as published by the Free Software
 
7
Foundation; version 2 of the License.
 
8
 
 
9
This program is distributed in the hope that it will be useful, but WITHOUT
 
10
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 
12
 
 
13
You should have received a copy of the GNU General Public License along with
 
14
this program; if not, write to the Free Software Foundation, Inc.,
 
15
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
 
16
 
 
17
*****************************************************************************/
 
18
 
 
19
/**************************************************//**
 
20
@file include/api0misc.h
 
21
InnoDB Native API
 
22
 
 
23
3/20/2011 Jimmy Yang extracted from Embedded InnoDB
 
24
2008 Created by Sunny Bains
 
25
*******************************************************/
 
26
 
 
27
#ifndef api0misc_h
 
28
#define api0misc_h
 
29
 
 
30
#include "univ.i"
 
31
#include "os0file.h"
 
32
#include "que0que.h"
 
33
#include "trx0trx.h"
 
34
 
 
35
/** Whether binlog is enabled for applications using InnoDB APIs */
 
36
extern my_bool                  ib_binlog_enabled;
 
37
 
 
38
/** Whether MySQL MDL is enabled for applications using InnoDB APIs */
 
39
extern my_bool                  ib_mdl_enabled;
 
40
 
 
41
/** Whether InnoDB row lock is disabled for applications using InnoDB APIs */
 
42
extern my_bool                  ib_disable_row_lock;
 
43
 
 
44
/** configure value for transaction isolation level */
 
45
extern ulong                    ib_trx_level_setting;
 
46
 
 
47
/** configure value for background commit interval (in seconds) */
 
48
extern ulong                    ib_bk_commit_interval;
 
49
 
 
50
/********************************************************************
 
51
Handles user errors and lock waits detected by the database engine.
 
52
@return TRUE if it was a lock wait and we should continue running
 
53
the query thread */
 
54
UNIV_INTERN
 
55
ibool
 
56
ib_handle_errors(
 
57
/*=============*/
 
58
        dberr_t*        new_err,        /*!< out: possible new error
 
59
                                        encountered in lock wait, or if
 
60
                                        no new error, the value of
 
61
                                        trx->error_state at the entry of this
 
62
                                        function */
 
63
        trx_t*          trx,            /*!< in: transaction */
 
64
        que_thr_t*      thr,            /*!< in: query thread */
 
65
        trx_savept_t*   savept);        /*!< in: savepoint or NULL */
 
66
 
 
67
/*************************************************************************
 
68
Sets a lock on a table.
 
69
@return error code or DB_SUCCESS */
 
70
UNIV_INTERN
 
71
dberr_t
 
72
ib_trx_lock_table_with_retry(
 
73
/*=========================*/
 
74
        trx_t*          trx,            /*!< in/out: transaction */
 
75
        dict_table_t*   table,          /*!< in: table to lock */
 
76
        enum lock_mode  mode);          /*!< in: lock mode */
 
77
 
 
78
#endif /* api0misc_h */