summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>2017-05-18 13:53:27 +0530
committerMarko Mäkelä <marko.makela@mariadb.com>2017-08-09 22:28:30 +0300
commit38be0beb5da1ee72697242504a5e21766063bc41 (patch)
treefce4d50b373d43442a6b693989ebc083f7d9d44f
parent5721d5ba125fa22ee24d0a0dee1a3ac8672c92b0 (diff)
downloadmariadb-git-38be0beb5da1ee72697242504a5e21766063bc41.tar.gz
Bug #24961167 CONCURRENT INSERT FAILS IF TABLE DOES REBUILD
Analysis: ========= During alter table rebuild, InnoDB fails to apply concurrent insert log. If the insert log record is present across the blocks then apply phase trying to access the next block without fetching it. Fix: ==== During virtual column parsing, check whether the record is present across the blocks before accessing the virtual column information. Reviewed-by: Jimmy Yang <jimmy.yang@oracle.com> RB: 16243
-rw-r--r--storage/innobase/row/row0log.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc
index 2d99609d935..31a5402dc15 100644
--- a/storage/innobase/row/row0log.cc
+++ b/storage/innobase/row/row0log.cc
@@ -2419,6 +2419,9 @@ row_log_table_apply_op(
next_mrec = mrec + rec_offs_data_size(offsets);
if (log->table->n_v_cols) {
+ if (next_mrec + 2 > mrec_end) {
+ return(NULL);
+ }
next_mrec += mach_read_from_2(next_mrec);
}