diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-10-04 09:27:24 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-10-04 09:27:24 +0300 |
commit | 08e4d3fee9d1b56fcf35285cae61380fcad1e51f (patch) | |
tree | 8e45589a9c899da83cda684ccfdf8820d10eb8aa | |
parent | e3ae2b1643d75a7617cf548a239c7cee432ed6ca (diff) | |
download | mariadb-git-08e4d3fee9d1b56fcf35285cae61380fcad1e51f.tar.gz |
row_purge_parse_undo_rec(): Properly parse TRX_UNDO_INSERT_DEFAULT
-rw-r--r-- | storage/innobase/include/trx0rec.h | 3 | ||||
-rw-r--r-- | storage/innobase/row/row0purge.cc | 9 | ||||
-rw-r--r-- | storage/innobase/row/row0uins.cc | 10 | ||||
-rw-r--r-- | storage/innobase/trx/trx0rec.cc | 10 |
4 files changed, 20 insertions, 12 deletions
diff --git a/storage/innobase/include/trx0rec.h b/storage/innobase/include/trx0rec.h index 73a1d4c36ef..a6889696036 100644 --- a/storage/innobase/include/trx0rec.h +++ b/storage/innobase/include/trx0rec.h @@ -326,6 +326,9 @@ record */ storage fields: used by purge to free the external storage */ +/** The search tuple corresponding to TRX_UNDO_INSERT_DEFAULT */ +extern const dtuple_t trx_undo_default_rec; + #include "trx0rec.ic" #endif /* trx0rec_h */ diff --git a/storage/innobase/row/row0purge.cc b/storage/innobase/row/row0purge.cc index 78523822546..f4f6d4cff9f 100644 --- a/storage/innobase/row/row0purge.cc +++ b/storage/innobase/row/row0purge.cc @@ -981,12 +981,15 @@ err_exit: return(false); } + if (type == TRX_UNDO_INSERT_DEFAULT) { + node->ref = &trx_undo_default_rec; + return(true); + } + ptr = trx_undo_rec_get_row_ref(ptr, clust_index, &(node->ref), node->heap); - switch (type) { - case TRX_UNDO_INSERT_DEFAULT: - case TRX_UNDO_INSERT_REC: + if (type == TRX_UNDO_INSERT_REC) { return(true); } diff --git a/storage/innobase/row/row0uins.cc b/storage/innobase/row/row0uins.cc index 768a14050b2..cf2b8db5432 100644 --- a/storage/innobase/row/row0uins.cc +++ b/storage/innobase/row/row0uins.cc @@ -452,15 +452,7 @@ close_table: node->heap); } else { ut_ad(type == TRX_UNDO_INSERT_DEFAULT); - static const dtuple_t min_rec = { - REC_INFO_DEFAULT_ROW, 0, 0, - NULL, 0, NULL, - UT_LIST_NODE_T(dtuple_t)() -#ifdef UNIV_DEBUG - , DATA_TUPLE_MAGIC_N -#endif /* UNIV_DEBUG */ - }; - node->ref = &min_rec; + node->ref = &trx_undo_default_rec; } if (!row_undo_search_clust_to_pcur(node)) { diff --git a/storage/innobase/trx/trx0rec.cc b/storage/innobase/trx/trx0rec.cc index ddb8e97d8cc..931d50e4b82 100644 --- a/storage/innobase/trx/trx0rec.cc +++ b/storage/innobase/trx/trx0rec.cc @@ -41,6 +41,16 @@ Created 3/26/1996 Heikki Tuuri #include "fsp0sysspace.h" #include "row0mysql.h" +/** The search tuple corresponding to TRX_UNDO_INSERT_DEFAULT */ +const dtuple_t trx_undo_default_rec = { + REC_INFO_DEFAULT_ROW, 0, 0, + NULL, 0, NULL, + UT_LIST_NODE_T(dtuple_t)() +#ifdef UNIV_DEBUG + , DATA_TUPLE_MAGIC_N +#endif /* UNIV_DEBUG */ +}; + /*=========== UNDO LOG RECORD CREATION AND DECODING ====================*/ /**********************************************************************//** |