summaryrefslogtreecommitdiff
path: root/storage/xtradb/row/row0ins.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/row/row0ins.cc')
-rw-r--r--storage/xtradb/row/row0ins.cc33
1 files changed, 16 insertions, 17 deletions
diff --git a/storage/xtradb/row/row0ins.cc b/storage/xtradb/row/row0ins.cc
index f653a4df77d..472be8ad848 100644
--- a/storage/xtradb/row/row0ins.cc
+++ b/storage/xtradb/row/row0ins.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, MariaDB Corporation.
+Copyright (c) 2017, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -571,7 +571,8 @@ row_ins_cascade_calc_update_vec(
if (!dfield_is_null(&ufield->new_val)
&& dtype_get_at_most_n_mbchars(
- col->prtype, col->mbminmaxlen,
+ col->prtype,
+ col->mbminlen, col->mbmaxlen,
col->len,
ufield_len,
static_cast<char*>(
@@ -1330,7 +1331,7 @@ row_ins_foreign_check_on_constraint(
row_mysql_freeze_data_dictionary(thr_get_trx(thr));
- mtr_start_trx(mtr, trx);
+ mtr_start(mtr);
/* Restore pcur position */
@@ -1358,7 +1359,7 @@ nonstandard_exit_func:
btr_pcur_store_position(pcur, mtr);
mtr_commit(mtr);
- mtr_start_trx(mtr, trx);
+ mtr_start(mtr);
btr_pcur_restore_position(BTR_SEARCH_LEAF, pcur, mtr);
@@ -1571,7 +1572,7 @@ run_again:
}
}
- mtr_start_trx(&mtr, trx);
+ mtr_start(&mtr);
/* Store old value on n_fields_cmp */
@@ -2390,7 +2391,7 @@ row_ins_clust_index_entry_low(
search_mode = mode;
}
- mtr_start_trx(&mtr, thr_get_trx(thr));
+ mtr_start(&mtr);
if (mode == BTR_MODIFY_LEAF && dict_index_is_online_ddl(index)) {
@@ -2628,10 +2629,9 @@ Starts a mini-transaction and checks if the index will be dropped.
@return true if the index is to be dropped */
static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
-row_ins_sec_mtr_start_trx_and_check_if_aborted(
+row_ins_sec_mtr_start_and_check_if_aborted(
/*=======================================*/
mtr_t* mtr, /*!< out: mini-transaction */
- trx_t* trx, /*!< in: transaction handle */
dict_index_t* index, /*!< in/out: secondary index */
bool check, /*!< in: whether to check */
ulint search_mode)
@@ -2639,7 +2639,7 @@ row_ins_sec_mtr_start_trx_and_check_if_aborted(
{
ut_ad(!dict_index_is_clust(index));
- mtr_start_trx(mtr, trx);
+ mtr_start(mtr);
if (!check) {
return(false);
@@ -2697,14 +2697,13 @@ row_ins_sec_index_entry_low(
ulint n_unique;
mtr_t mtr;
ulint* offsets = NULL;
- trx_t* trx = thr_get_trx(thr);
ut_ad(!dict_index_is_clust(index));
ut_ad(mode == BTR_MODIFY_LEAF || mode == BTR_MODIFY_TREE);
cursor.thr = thr;
ut_ad(thr_get_trx(thr)->id);
- mtr_start_trx(&mtr, trx);
+ mtr_start(&mtr);
/* If running with fake_changes mode on then avoid using insert buffer
and also switch from modify to search so that code takes only s-latch
@@ -2766,7 +2765,7 @@ row_ins_sec_index_entry_low(
if (err != DB_SUCCESS) {
if (err == DB_DECRYPTION_FAILED) {
- ib_push_warning(trx->mysql_thd,
+ ib_push_warning(thr_get_trx(thr)->mysql_thd,
DB_DECRYPTION_FAILED,
"Table %s is encrypted but encryption service or"
" used key_id is not available. "
@@ -2802,8 +2801,8 @@ row_ins_sec_index_entry_low(
DEBUG_SYNC_C("row_ins_sec_index_unique");
- if (row_ins_sec_mtr_start_trx_and_check_if_aborted(
- &mtr, trx, index, check, search_mode)) {
+ if (row_ins_sec_mtr_start_and_check_if_aborted(
+ &mtr, index, check, search_mode)) {
goto func_exit;
}
@@ -2837,8 +2836,8 @@ row_ins_sec_index_entry_low(
return(err);
}
- if (row_ins_sec_mtr_start_trx_and_check_if_aborted(
- &mtr, trx, index, check, search_mode)) {
+ if (row_ins_sec_mtr_start_and_check_if_aborted(
+ &mtr, index, check, search_mode)) {
goto func_exit;
}
@@ -3147,7 +3146,7 @@ row_ins_index_entry_set_vals(
= dict_field_get_col(ind_field);
len = dtype_get_at_most_n_mbchars(
- col->prtype, col->mbminmaxlen,
+ col->prtype, col->mbminlen, col->mbmaxlen,
ind_field->prefix_len,
len,
static_cast<const char*>(