Commit b6992df1 authored by Sergei Petrunia's avatar Sergei Petrunia

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.
parent 3fcb770f
...@@ -945,7 +945,7 @@ int ha_xpand::index_read(uchar * buf, const uchar * key, uint key_len, ...@@ -945,7 +945,7 @@ int ha_xpand::index_read(uchar * buf, const uchar * key, uint key_len,
uchar *rowdata = NULL; uchar *rowdata = NULL;
if (exact) { if (exact) {
is_scan = false; is_scan = false;
ulong rowdata_length; ulonglong rowdata_length;
error_code = trx->key_read(xpand_table_oid, 0, xpd_lock_type, error_code = trx->key_read(xpand_table_oid, 0, xpd_lock_type,
table->read_set, packed_key, packed_key_len, table->read_set, packed_key, packed_key_len,
&rowdata, &rowdata_length); &rowdata, &rowdata_length);
...@@ -1170,7 +1170,7 @@ int ha_xpand::rnd_pos(uchar * buf, uchar *pos) ...@@ -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); build_key_packed_row(table->s->primary_key, buf, packed_key, &packed_key_len);
uchar *rowdata = NULL; uchar *rowdata = NULL;
ulong rowdata_length; ulonglong rowdata_length;
if ((error_code = trx->key_read(xpand_table_oid, 0, xpd_lock_type, if ((error_code = trx->key_read(xpand_table_oid, 0, xpd_lock_type,
table->read_set, packed_key, packed_key_len, table->read_set, packed_key, packed_key_len,
&rowdata, &rowdata_length))) &rowdata, &rowdata_length)))
......
...@@ -528,7 +528,7 @@ int xpand_connection::key_delete(ulonglong xpand_table_oid, ...@@ -528,7 +528,7 @@ int xpand_connection::key_delete(ulonglong xpand_table_oid,
int xpand_connection::key_read(ulonglong xpand_table_oid, uint index, int xpand_connection::key_read(ulonglong xpand_table_oid, uint index,
xpand_lock_mode_t lock_mode, MY_BITMAP *read_set, xpand_lock_mode_t lock_mode, MY_BITMAP *read_set,
uchar *packed_key, ulong packed_key_length, uchar *packed_key, ulong packed_key_length,
uchar **rowdata, ulong *rowdata_length) uchar **rowdata, ulonglong *rowdata_length)
{ {
int error_code; int error_code;
command_length = 0; command_length = 0;
...@@ -625,7 +625,7 @@ class xpand_connection_cursor { ...@@ -625,7 +625,7 @@ class xpand_connection_cursor {
} }
uchar *rowdata = xpand_net->net.read_pos; 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) { if (!rowdata_length) {
// We have read all rows in this batch. // We have read all rows in this batch.
DBUG_RETURN(0); DBUG_RETURN(0);
......
...@@ -78,7 +78,7 @@ class xpand_connection ...@@ -78,7 +78,7 @@ class xpand_connection
int key_read(ulonglong xpand_table_oid, uint index, int key_read(ulonglong xpand_table_oid, uint index,
xpand_lock_mode_t lock_mode, MY_BITMAP *read_set, xpand_lock_mode_t lock_mode, MY_BITMAP *read_set,
uchar *packed_key, ulong packed_key_length, uchar **rowdata, 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 sort_order {SORT_NONE = 0, SORT_ASC = 1, SORT_DESC = 2};
enum scan_type { enum scan_type {
READ_KEY_OR_NEXT, /* rows with key and greater */ READ_KEY_OR_NEXT, /* rows with key and greater */
......
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