revision-id: 3b7b3843eb437544735a10bf4a03929430e69dea (mariadb-10.5.0-243-g3b7b3843eb4) parent(s): 219d7f769634b007953b4d16c9d484adfd7abd6e author: Sergei Petrunia committer: Sergei Petrunia timestamp: 2020-03-04 13:27:34 +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 56053c8ca1f..78a84b7c049 100644 --- a/storage/xpand/ha_xpand.cc +++ b/storage/xpand/ha_xpand.cc @@ -940,7 +940,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); @@ -1148,7 +1148,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 8e0b5db9e6d..d8425e603e4 100644 --- a/storage/xpand/xpand_connection.cc +++ b/storage/xpand/xpand_connection.cc @@ -497,7 +497,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; @@ -594,7 +594,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 419d7f3ef35..541af350dbc 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 */