Commit 3dfeae0e authored by Marko Mäkelä's avatar Marko Mäkelä

Cleanup: Fix Intel compiler warnings about sign conversions

parent 4a22056c
...@@ -4158,7 +4158,7 @@ void btr_cur_upd_rec_in_place(rec_t *rec, const dict_index_t *index, ...@@ -4158,7 +4158,7 @@ void btr_cur_upd_rec_in_place(rec_t *rec, const dict_index_t *index,
} }
ulint l = rec_get_1byte_offs_flag(rec) ulint l = rec_get_1byte_offs_flag(rec)
? (n + 1) : (n + 1) * 2; ? (n + 1) : (n + 1) * 2;
byte* b = &rec[-REC_N_OLD_EXTRA_BYTES - l]; byte* b = rec - REC_N_OLD_EXTRA_BYTES - l;
compile_time_assert(REC_1BYTE_SQL_NULL_MASK << 8 compile_time_assert(REC_1BYTE_SQL_NULL_MASK << 8
== REC_2BYTE_SQL_NULL_MASK); == REC_2BYTE_SQL_NULL_MASK);
mtr->write<1>(*block, b, mtr->write<1>(*block, b,
...@@ -4181,7 +4181,7 @@ void btr_cur_upd_rec_in_place(rec_t *rec, const dict_index_t *index, ...@@ -4181,7 +4181,7 @@ void btr_cur_upd_rec_in_place(rec_t *rec, const dict_index_t *index,
ut_ad(len == rec_get_nth_field_size(rec, n)); ut_ad(len == rec_get_nth_field_size(rec, n));
ulint l = rec_get_1byte_offs_flag(rec) ulint l = rec_get_1byte_offs_flag(rec)
? (n + 1) : (n + 1) * 2; ? (n + 1) : (n + 1) * 2;
byte* b = &rec[-REC_N_OLD_EXTRA_BYTES - l]; byte* b = rec - REC_N_OLD_EXTRA_BYTES - l;
compile_time_assert(REC_1BYTE_SQL_NULL_MASK << 8 compile_time_assert(REC_1BYTE_SQL_NULL_MASK << 8
== REC_2BYTE_SQL_NULL_MASK); == REC_2BYTE_SQL_NULL_MASK);
mtr->write<1>(*block, b, mtr->write<1>(*block, b,
......
...@@ -30,9 +30,9 @@ class rw_lock ...@@ -30,9 +30,9 @@ class rw_lock
/** Available lock */ /** Available lock */
static constexpr uint32_t UNLOCKED= 0; static constexpr uint32_t UNLOCKED= 0;
/** Flag to indicate that write_lock() is being held */ /** Flag to indicate that write_lock() is being held */
static constexpr uint32_t WRITER= 1 << 31; static constexpr uint32_t WRITER= 1U << 31;
/** Flag to indicate that write_lock_wait() is pending */ /** Flag to indicate that write_lock_wait() is pending */
static constexpr uint32_t WRITER_WAITING= 1 << 30; static constexpr uint32_t WRITER_WAITING= 1U << 30;
/** Flag to indicate that write_lock() or write_lock_wait() is pending */ /** Flag to indicate that write_lock() or write_lock_wait() is pending */
static constexpr uint32_t WRITER_PENDING= WRITER | WRITER_WAITING; static constexpr uint32_t WRITER_PENDING= WRITER | WRITER_WAITING;
......
...@@ -2683,7 +2683,7 @@ bool page_apply_insert_dynamic(const buf_block_t &block, bool reuse, ...@@ -2683,7 +2683,7 @@ bool page_apply_insert_dynamic(const buf_block_t &block, bool reuse,
data_len-= enc_hdr_l >> 3; data_len-= enc_hdr_l >> 3;
data= &static_cast<const byte*>(data)[enc_hdr_l >> 3]; data= &static_cast<const byte*>(data)[enc_hdr_l >> 3];
memcpy(buf, &prev_rec[-REC_N_NEW_EXTRA_BYTES - hdr_c], hdr_c); memcpy(buf, prev_rec - REC_N_NEW_EXTRA_BYTES - hdr_c, hdr_c);
buf+= hdr_c; buf+= hdr_c;
*buf++= static_cast<byte>((enc_hdr_l & 3) << 4); /* info_bits; n_owned=0 */ *buf++= static_cast<byte>((enc_hdr_l & 3) << 4); /* info_bits; n_owned=0 */
*buf++= static_cast<byte>(h >> 5); /* MSB of heap number */ *buf++= static_cast<byte>(h >> 5); /* MSB of heap number */
......
...@@ -1820,8 +1820,8 @@ row_merge_read_clustered_index( ...@@ -1820,8 +1820,8 @@ row_merge_read_clustered_index(
based on that. */ based on that. */
clust_index = dict_table_get_first_index(old_table); clust_index = dict_table_get_first_index(old_table);
const ulint old_trx_id_col = DATA_TRX_ID - DATA_N_SYS_COLS const ulint old_trx_id_col = ulint(old_table->n_cols)
+ ulint(old_table->n_cols); - (DATA_N_SYS_COLS - DATA_TRX_ID);
ut_ad(old_table->cols[old_trx_id_col].mtype == DATA_SYS); ut_ad(old_table->cols[old_trx_id_col].mtype == DATA_SYS);
ut_ad(old_table->cols[old_trx_id_col].prtype ut_ad(old_table->cols[old_trx_id_col].prtype
== (DATA_TRX_ID | DATA_NOT_NULL)); == (DATA_TRX_ID | DATA_NOT_NULL));
......
...@@ -2455,7 +2455,7 @@ trx_undo_prev_version_build( ...@@ -2455,7 +2455,7 @@ trx_undo_prev_version_build(
== rec_get_nth_field_size(rec, n)); == rec_get_nth_field_size(rec, n));
ulint l = rec_get_1byte_offs_flag(*old_vers) ulint l = rec_get_1byte_offs_flag(*old_vers)
? (n + 1) : (n + 1) * 2; ? (n + 1) : (n + 1) * 2;
(*old_vers)[-REC_N_OLD_EXTRA_BYTES - l] *(*old_vers - REC_N_OLD_EXTRA_BYTES - l)
&= byte(~REC_1BYTE_SQL_NULL_MASK); &= byte(~REC_1BYTE_SQL_NULL_MASK);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment