mariadb/storage/innobase/row
Marko Mäkelä 9f89b94ba6 MDEV-12358 Work around what looks like a bug in GCC 7.1.0
The parameter thr of the function btr_cur_optimistic_insert()
is not declared as nonnull, but GCC 7.1.0 with -O3 is wrongly
optimizing away the first part of the condition
UNIV_UNLIKELY(thr && thr_get_trx(thr)->fake_changes)
when the function is being called by row_merge_insert_index_tuples()
with thr==NULL.

The fake_changes is an XtraDB addition. This GCC bug only appears
to have an impact on XtraDB, not InnoDB.

We work around the problem by not attempting to dereference thr
when both BTR_NO_LOCKING_FLAG and BTR_NO_UNDO_LOG_FLAG are set
in the flags. Probably BTR_NO_LOCKING_FLAG alone should suffice.

btr_cur_optimistic_insert(), btr_cur_pessimistic_insert(),
btr_cur_pessimistic_update(): Correct comments that disagree with
usage and with nonnull attributes. No other parameter than thr can
actually be NULL.

row_ins_duplicate_error_in_clust(): Remove an unused parameter.

innobase_is_fake_change(): Unused function; remove.

ibuf_insert_low(), row_log_table_apply(), row_log_apply(),
row_undo_mod_clust_low():
Because we will be passing BTR_NO_LOCKING_FLAG | BTR_NO_UNDO_LOG_FLAG
in the flags, the trx->fake_changes flag will be treated as false,
which is the right thing to do at these low-level operations
(change buffer merge, ALTER TABLE…LOCK=NONE, or ROLLBACK).
This might be fixing actual XtraDB bugs.

Other callers that pass these two flags are also passing thr=NULL,
implying fake_changes=false. (Some callers in ROLLBACK are passing
BTR_NO_LOCKING_FLAG and a nonnull thr. In these callers, fake_changes
better be false, to avoid corruption.)
2017-05-17 16:09:22 +03:00
..
row0ext.cc move to storage/innobase 2015-05-04 19:17:21 +02:00
row0ftsort.cc Remove redundant UT_LIST_INIT() calls 2017-05-17 10:33:49 +03:00
row0import.cc Silence bogus GCC 7 warnings -Wimplicit-fallthrough 2017-05-17 08:07:02 +03:00
row0ins.cc MDEV-12358 Work around what looks like a bug in GCC 7.1.0 2017-05-17 16:09:22 +03:00
row0log.cc Silence bogus GCC 7 warnings -Wimplicit-fallthrough 2017-05-17 08:07:02 +03:00
row0merge.cc MDEV-12488 Remove type mismatch in InnoDB printf-like calls 2017-04-21 12:06:29 +03:00
row0mysql.cc Silence bogus GCC 7 warnings -Wimplicit-fallthrough 2017-05-17 08:07:02 +03:00
row0purge.cc Silence bogus GCC 7 warnings -Wimplicit-fallthrough 2017-05-17 08:07:02 +03:00
row0quiesce.cc 5.6.31 2016-06-21 14:21:03 +02:00
row0row.cc 5.6.31 2016-06-21 14:21:03 +02:00
row0sel.cc Merge branch 'merge-innodb-5.6' into 10.0 2016-06-21 14:58:19 +02:00
row0uins.cc 5.6.31 2016-06-21 14:21:03 +02:00
row0umod.cc Merge branch 'merge-innodb-5.6' into 10.0 2016-06-21 14:58:19 +02:00
row0undo.cc 5.6.31 2016-06-21 14:21:03 +02:00
row0upd.cc Merge branch '5.5' into 10.0 2017-03-03 01:37:54 +02:00
row0vers.cc move to storage/innobase 2015-05-04 19:17:21 +02:00