[Commits] 62f04a2e803: Fix compile warnings on windows
revision-id: 62f04a2e803a620b80905b189a9c4f2f250e4df6 (mariadb-10.4.4-754-g62f04a2e803) parent(s): 1748b24f5d42b254cb36fe3eac573473eea72e97 author: Sergei Petrunia committer: Sergei Petrunia timestamp: 2020-03-10 01:27:03 +0300 message: Fix compile warnings on windows The fix needs a followup: "ulong" is 32-bit on 64-bit Windows, so xpand_connection_cursor::rowdata::length needs to be 64-bit but this causes a cascade of datatype changes all over the code. --- storage/xpand/ha_xpand.cc | 4 ++-- storage/xpand/xpand_connection.cc | 4 ++-- storage/xpand/xpand_connection.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/storage/xpand/ha_xpand.cc b/storage/xpand/ha_xpand.cc index 3c8c891f51d..04369c35fe8 100644 --- a/storage/xpand/ha_xpand.cc +++ b/storage/xpand/ha_xpand.cc @@ -945,7 +945,7 @@ int ha_xpand::index_read(uchar * buf, const uchar * key, uint key_len, uchar *rowdata = NULL; if (exact) { is_scan = false; - ulong rowdata_length; + ulonglong rowdata_length; error_code = trx->key_read(xpand_table_oid, 0, xpd_lock_type, table->read_set, packed_key, packed_key_len, &rowdata, &rowdata_length); @@ -1170,7 +1170,7 @@ int ha_xpand::rnd_pos(uchar * buf, uchar *pos) build_key_packed_row(table->s->primary_key, buf, packed_key, &packed_key_len); uchar *rowdata = NULL; - ulong rowdata_length; + ulonglong rowdata_length; if ((error_code = trx->key_read(xpand_table_oid, 0, xpd_lock_type, table->read_set, packed_key, packed_key_len, &rowdata, &rowdata_length))) diff --git a/storage/xpand/xpand_connection.cc b/storage/xpand/xpand_connection.cc index 8fa1ef37483..8d2ccf00816 100644 --- a/storage/xpand/xpand_connection.cc +++ b/storage/xpand/xpand_connection.cc @@ -529,7 +529,7 @@ int xpand_connection::key_delete(ulonglong xpand_table_oid, int xpand_connection::key_read(ulonglong xpand_table_oid, uint index, xpand_lock_mode_t lock_mode, MY_BITMAP *read_set, uchar *packed_key, ulong packed_key_length, - uchar **rowdata, ulong *rowdata_length) + uchar **rowdata, ulonglong *rowdata_length) { int error_code; command_length = 0; @@ -626,7 +626,7 @@ class xpand_connection_cursor { } uchar *rowdata = xpand_net->net.read_pos; - ulong rowdata_length = safe_net_field_length_ll(&rowdata, packet_length); + ulong rowdata_length = (ulong) safe_net_field_length_ll(&rowdata, packet_length); if (!rowdata_length) { // We have read all rows in this batch. DBUG_RETURN(0); diff --git a/storage/xpand/xpand_connection.h b/storage/xpand/xpand_connection.h index c5b558857d6..beeaf8a95f4 100644 --- a/storage/xpand/xpand_connection.h +++ b/storage/xpand/xpand_connection.h @@ -78,7 +78,7 @@ class xpand_connection int key_read(ulonglong xpand_table_oid, uint index, xpand_lock_mode_t lock_mode, MY_BITMAP *read_set, uchar *packed_key, ulong packed_key_length, uchar **rowdata, - ulong *rowdata_length); + ulonglong *rowdata_length); enum sort_order {SORT_NONE = 0, SORT_ASC = 1, SORT_DESC = 2}; enum scan_type { READ_KEY_OR_NEXT, /* rows with key and greater */
participants (1)
-
psergey