diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-30 15:46:09 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-30 18:22:52 +0300 |
commit | 9801715cb0ce71ab248464bdcfad0cfa82e998e6 (patch) | |
tree | 14a196c02b6f081e74abeccc0a57c64ef5b65112 /storage/innobase/include/row0upd.ic | |
parent | 8cd55ae2a998626631a41c8d3a4ec38c59b4b607 (diff) | |
download | mariadb-git-9801715cb0ce71ab248464bdcfad0cfa82e998e6.tar.gz |
Use compile_time_assert() in InnoDB
Replace most use of #error. Some checks were impossible to
evaluate in the preprocessor due to the use of named
integer constants or enumerations.
Diffstat (limited to 'storage/innobase/include/row0upd.ic')
-rw-r--r-- | storage/innobase/include/row0upd.ic | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/storage/innobase/include/row0upd.ic b/storage/innobase/include/row0upd.ic index 364c876ecc7..5e43a272388 100644 --- a/storage/innobase/include/row0upd.ic +++ b/storage/innobase/include/row0upd.ic @@ -181,9 +181,8 @@ row_upd_rec_sys_fields( offset = row_get_trx_id_offset(index, offsets); } -#if DATA_TRX_ID + 1 != DATA_ROLL_PTR -# error "DATA_TRX_ID + 1 != DATA_ROLL_PTR" -#endif + compile_time_assert(DATA_TRX_ID + 1 == DATA_ROLL_PTR); + /* During IMPORT the trx id in the record can be in the future, if the .ibd file is being imported from another instance. During IMPORT roll_ptr will be 0. */ |