summaryrefslogtreecommitdiff
path: root/storage/innobase/include
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2021-03-06 05:55:14 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2021-03-12 16:56:47 +0530
commiteb7c5530eccb7d6782077e5562f5a471d2ccbc01 (patch)
treed4c09e919371cf75de22bf99d08195c36e93c32f /storage/innobase/include
parent08e8ad7c717302a77db91cfa06909eb8c10006fb (diff)
downloadmariadb-git-eb7c5530eccb7d6782077e5562f5a471d2ccbc01.tar.gz
MDEV-24730 Insert log operation fails after purge resets n_core_fields
Online log for insert operation of redundant table fails with index->is_instant() assert. Purge can reset the n_core_fields when alter is waiting to upgrade MDL for commit phase of DDL. In the meantime, any insert DML tries to log the operation fails with index is not being instant. row_log_get_n_core_fields(): Get the n_core_fields of online log for the given index. rec_get_converted_size_comp_prefix_low(): Use n_core_fields of online log when InnoDB calculates the size of data tuple during redundant row format table rebuild. rec_convert_dtuple_to_rec_comp(): Use n_core_fields of online log when InnoDB does the conversion of data tuple to record during redudant row format table rebuild. - Adding the test case which has more than 129 instant columns.
Diffstat (limited to 'storage/innobase/include')
-rw-r--r--storage/innobase/include/rem0rec.h2
-rw-r--r--storage/innobase/include/row0log.h5
2 files changed, 7 insertions, 0 deletions
diff --git a/storage/innobase/include/rem0rec.h b/storage/innobase/include/rem0rec.h
index f88df8de25c..41980cde2c8 100644
--- a/storage/innobase/include/rem0rec.h
+++ b/storage/innobase/include/rem0rec.h
@@ -982,6 +982,7 @@ rec_copy(
@param[out] extra record header size
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_COLUMNS_ADDED
@return total size, in bytes */
+template<bool redundant_temp>
ulint
rec_get_converted_size_temp(
const dict_index_t* index,
@@ -1026,6 +1027,7 @@ rec_init_offsets_temp(
@param[in] n_fields number of data fields
@param[in] status REC_STATUS_ORDINARY or REC_STATUS_COLUMNS_ADDED
*/
+template<bool redundant_temp>
void
rec_convert_dtuple_to_temp(
rec_t* rec,
diff --git a/storage/innobase/include/row0log.h b/storage/innobase/include/row0log.h
index 232019aee9f..1e1b31c2547 100644
--- a/storage/innobase/include/row0log.h
+++ b/storage/innobase/include/row0log.h
@@ -247,6 +247,11 @@ row_log_apply(
ut_stage_alter_t* stage)
MY_ATTRIBUTE((warn_unused_result));
+/** Get the n_core_fields of online log for the index
+@param index index whose n_core_fields of log to be accessed
+@return number of n_core_fields */
+unsigned row_log_get_n_core_fields(const dict_index_t *index);
+
#ifdef HAVE_PSI_STAGE_INTERFACE
/** Estimate how much work is to be done by the log apply phase
of an ALTER TABLE for this index.