summaryrefslogtreecommitdiff
path: root/storage/innobase/include/trx0rec.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-05-03 16:47:07 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-05-03 20:02:50 +0300
commitce195987c3c995470992f16ca7a985796d6b65a6 (patch)
treee865c979c084f571c3532b46c7799b43b76942ff /storage/innobase/include/trx0rec.h
parent3db94d2403c1f2791bddd43656d7b0d6320b453d (diff)
downloadmariadb-git-ce195987c3c995470992f16ca7a985796d6b65a6.tar.gz
MDEV-19385: Inconsistent definition of dtuple_get_nth_v_field()
The accessor dtuple_get_nth_v_field() was defined differently between debug and release builds in MySQL 5.7.8 in mysql/mysql-server@c47e1751b742454de553937039bbf2bcbe3c6bc7 and a debug assertion to document or enforce the questionable assumption tuple->v_fields == &tuple->fields[tuple->n_fields] was missing. This was apparently no problem until MDEV-11369 introduced instant ADD COLUMN to MariaDB Server 10.3. With that work present, in one test case, trx_undo_report_insert_virtual() could in release builds fetch the wrong value for a virtual column. We replace many of the dtuple_t accessors with const-preserving inline functions, and fix missing or misleadingly applied const qualifiers accordingly.
Diffstat (limited to 'storage/innobase/include/trx0rec.h')
-rw-r--r--storage/innobase/include/trx0rec.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/storage/innobase/include/trx0rec.h b/storage/innobase/include/trx0rec.h
index ea6269b5ba4..99cebc36522 100644
--- a/storage/innobase/include/trx0rec.h
+++ b/storage/innobase/include/trx0rec.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -250,7 +250,7 @@ trx_undo_prev_version_build(
dtuple if it is not yet created. This heap
diffs from "heap" above in that it could be
prebuilt->old_vers_heap for selection */
- const dtuple_t**vrow, /*!< out: virtual column info, if any */
+ dtuple_t** vrow, /*!< out: virtual column info, if any */
ulint v_status);
/*!< in: status determine if it is going
into this function by purge thread or not.
@@ -299,7 +299,7 @@ void
trx_undo_read_v_cols(
const dict_table_t* table,
const byte* ptr,
- const dtuple_t* row,
+ dtuple_t* row,
bool in_purge);
/** Read virtual column index from undo log if the undo log contains such