~ubuntu-branches/ubuntu/wily/mysql-5.6/wily

« back to all changes in this revision

Viewing changes to plugin/innodb_memcached/innodb_memcache/src/innodb_api.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2015-07-21 07:09:29 UTC
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: package-import@ubuntu.com-20150721070929-mg4dpqkgg3it1ajf
Tags: upstream-5.6.25
ImportĀ upstreamĀ versionĀ 5.6.25

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
/** Whether to update all columns' value or a specific column value */
38
38
#define UPDATE_ALL_VAL_COL      -1
39
39
 
 
40
extern bool    release_mdl_lock;
 
41
 
40
42
extern option_t config_option_names[];
41
43
 
42
44
/** InnoDB API callback functions */
101
103
        (ib_cb_t*) &ib_cb_get_idx_field_name,
102
104
        (ib_cb_t*) &ib_cb_trx_get_start_time,
103
105
        (ib_cb_t*) &ib_cb_cfg_bk_commit_interval,
104
 
        (ib_cb_t*) &ib_cb_cursor_stmt_begin
 
106
        (ib_cb_t*) &ib_cb_cursor_stmt_begin,
 
107
        (ib_cb_t*) &ib_cb_trx_read_only
105
108
};
106
109
 
107
110
/** Set expiration time. If the exp sent by client is larger than
172
175
 
173
176
                /* If MDL is enabled, we need to create mysql handler. */
174
177
                if (engine) {
175
 
                        /* Create a "Fake" THD if binlog is enabled */
176
 
                        /* For flush_all which request IB_LOCK_TABLE_X
177
 
                        lock, we need to add MDL lock. It's because we need
178
 
                        to block DMLs from sql layer. */
179
 
                        if (conn_data && (engine->enable_binlog
180
 
                                          || engine->enable_mdl
181
 
                                          || lock_mode == IB_LOCK_TABLE_X)) {
 
178
 
 
179
                        if (lock_mode == IB_LOCK_NONE) {
 
180
 
 
181
                                /* Skip MDL locking for enabling reads */
 
182
                        } else if (conn_data && (engine->enable_binlog
 
183
                                                 || engine->enable_mdl
 
184
                                                 || lock_mode == IB_LOCK_TABLE_X)) {
 
185
 
 
186
                                /* Create a "Fake" THD if binlog is enabled */
 
187
                                /* For flush_all which request IB_LOCK_TABLE_X
 
188
                                lock, we need to add MDL lock. It's because we need
 
189
                                to block DMLs from sql layer. */
 
190
 
182
191
                                if (!conn_data->thd) {
183
192
                                        conn_data->thd = handler_create_thd(
184
193
                                                engine->enable_binlog);
2037
2046
                break;
2038
2047
        }
2039
2048
 
2040
 
        if (conn_data->n_reads_since_commit >= engine->read_batch_size
 
2049
        if (release_mdl_lock
 
2050
            || conn_data->n_reads_since_commit >= engine->read_batch_size
2041
2051
            || conn_data->n_writes_since_commit >= engine->write_batch_size
2042
2052
            || (op_type == CONN_OP_FLUSH) || !commit) {
2043
2053
                commit_trx = innodb_reset_conn(