Commit 33938156 authored by Sergei Petrunia's avatar Sergei Petrunia

XPand: fix compile error on Winx64: pass ushort to add_command_operand_ushort

Also add a safety check
parent b6992df1
......@@ -947,7 +947,11 @@ int xpand_connection::scan_next(xpand_connection_cursor *scan,
if ((error_code = begin_command(XPAND_SCAN_NEXT)))
return error_code;
if ((error_code = add_command_operand_ushort(scan->buffer_size)))
// This should not happen as @@xpand_row_buffer has this limit.
if (scan->buffer_size > 65535)
return HA_ERR_INTERNAL_ERROR;
if ((error_code = add_command_operand_ushort((ushort)scan->buffer_size)))
return error_code;
if ((error_code = add_command_operand_lcb(scan->scan_refid)))
......
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