mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:43:02 +01:00
Fixed bug CORE-5508 : Problem with establishing connect using client 3.0.2.32708 to server 4.0.0.572
This commit is contained in:
parent
d40ebbcd51
commit
9f7e241832
@ -324,7 +324,7 @@ public:
|
||||
|
||||
unsigned int getTimeout(CheckStatusWrapper* status)
|
||||
{
|
||||
if (statement->rsr_rdb->rdb_port->port_protocol < PROTOCOL_VERSION15)
|
||||
if (statement->rsr_rdb->rdb_port->port_protocol < PROTOCOL_STMT_TOUT)
|
||||
{
|
||||
status->setErrors(Arg::Gds(isc_wish_list).value());
|
||||
return 0;
|
||||
@ -335,7 +335,7 @@ public:
|
||||
|
||||
void setTimeout(CheckStatusWrapper* status, unsigned int timeOut)
|
||||
{
|
||||
if (timeOut && statement->rsr_rdb->rdb_port->port_protocol < PROTOCOL_VERSION15)
|
||||
if (timeOut && statement->rsr_rdb->rdb_port->port_protocol < PROTOCOL_STMT_TOUT)
|
||||
{
|
||||
status->setErrors(Arg::Gds(isc_wish_list).value());
|
||||
return;
|
||||
@ -1795,7 +1795,7 @@ void Attachment::execWithCheck(CheckStatusWrapper* status, const string& stmt)
|
||||
* case is when modern network server works with legacy engine.
|
||||
*
|
||||
**************************************/
|
||||
if (rdb->rdb_port->port_protocol >= PROTOCOL_VERSION15)
|
||||
if (rdb->rdb_port->port_protocol >= PROTOCOL_STMT_TOUT)
|
||||
{
|
||||
execute(status, NULL, stmt.length(), stmt.c_str(), SQL_DIALECT_CURRENT, NULL, NULL, NULL, NULL);
|
||||
|
||||
@ -1820,7 +1820,7 @@ void Attachment::execWithCheck(CheckStatusWrapper* status, const string& stmt)
|
||||
|
||||
unsigned int Attachment::getIdleTimeout(CheckStatusWrapper* status)
|
||||
{
|
||||
if (rdb->rdb_port->port_protocol >= PROTOCOL_VERSION15)
|
||||
if (rdb->rdb_port->port_protocol >= PROTOCOL_STMT_TOUT)
|
||||
return getSingleInfo(status, fb_info_ses_idle_timeout_att);
|
||||
|
||||
status->setErrors(Arg::Gds(isc_wish_list).value());
|
||||
@ -1839,7 +1839,7 @@ void Attachment::setIdleTimeout(CheckStatusWrapper* status, unsigned int timeOut
|
||||
|
||||
unsigned int Attachment::getStatementTimeout(CheckStatusWrapper* status)
|
||||
{
|
||||
if (rdb->rdb_port->port_protocol >= PROTOCOL_VERSION15)
|
||||
if (rdb->rdb_port->port_protocol >= PROTOCOL_STMT_TOUT)
|
||||
return getSingleInfo(status, fb_info_statement_timeout_att);
|
||||
|
||||
status->setErrors(Arg::Gds(isc_wish_list).value());
|
||||
|
@ -621,7 +621,8 @@ rem_port* INET_analyze(ClntAuthBlock* cBlock,
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION12, ptype_lazy_send, 3),
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION13, ptype_lazy_send, 4),
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION14, ptype_lazy_send, 5),
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION15, ptype_lazy_send, 6)
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION15, ptype_lazy_send, 6),
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION16, ptype_lazy_send, 7)
|
||||
};
|
||||
fb_assert(FB_NELEM(protocols_to_try) <= FB_NELEM(cnct->p_cnct_versions));
|
||||
cnct->p_cnct_count = FB_NELEM(protocols_to_try);
|
||||
|
@ -173,7 +173,9 @@ rem_port* WNET_analyze(ClntAuthBlock* cBlock,
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION11, ptype_batch_send, 2),
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION12, ptype_batch_send, 3),
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION13, ptype_batch_send, 4),
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION14, ptype_batch_send, 5)
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION14, ptype_batch_send, 5),
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION15, ptype_batch_send, 6),
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION16, ptype_batch_send, 7)
|
||||
};
|
||||
fb_assert(FB_NELEM(protocols_to_try) <= FB_NELEM(cnct->p_cnct_versions));
|
||||
cnct->p_cnct_count = FB_NELEM(protocols_to_try);
|
||||
|
@ -306,7 +306,8 @@ rem_port* XNET_analyze(ClntAuthBlock* cBlock,
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION12, ptype_batch_send, 3),
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION13, ptype_batch_send, 4),
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION14, ptype_batch_send, 5),
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION15, ptype_batch_send, 6)
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION15, ptype_batch_send, 6),
|
||||
REMOTE_PROTOCOL(PROTOCOL_VERSION16, ptype_batch_send, 7)
|
||||
};
|
||||
fb_assert(FB_NELEM(protocols_to_try) <= FB_NELEM(cnct->p_cnct_versions));
|
||||
cnct->p_cnct_count = FB_NELEM(protocols_to_try);
|
||||
|
@ -648,7 +648,7 @@ bool_t xdr_protocol(XDR* xdrs, PACKET* p)
|
||||
}
|
||||
{ // scope
|
||||
rem_port* port = (rem_port*) xdrs->x_public;
|
||||
if (port->port_protocol >= PROTOCOL_VERSION15)
|
||||
if (port->port_protocol >= PROTOCOL_STMT_TOUT)
|
||||
MAP(xdr_u_long, sqldata->p_sqldata_timeout);
|
||||
}
|
||||
DEBUG_PRINTSIZE(xdrs, p->p_operation);
|
||||
|
@ -84,10 +84,15 @@ const USHORT PROTOCOL_VERSION14 = (FB_PROTOCOL_FLAG | 14);
|
||||
|
||||
// Protocol 15:
|
||||
// - supports crypt key callback at connect phase
|
||||
// - supports statement timeouts
|
||||
|
||||
const USHORT PROTOCOL_VERSION15 = (FB_PROTOCOL_FLAG | 15);
|
||||
|
||||
// Protocol 16:
|
||||
// - supports statement timeouts
|
||||
|
||||
const USHORT PROTOCOL_VERSION16 = (FB_PROTOCOL_FLAG | 16);
|
||||
const USHORT PROTOCOL_STMT_TOUT = PROTOCOL_VERSION16;
|
||||
|
||||
// Architecture types
|
||||
|
||||
enum P_ARCH
|
||||
|
@ -1815,7 +1815,7 @@ static bool accept_connection(rem_port* port, P_CNCT* connect, PACKET* send)
|
||||
protocol < end; protocol++)
|
||||
{
|
||||
if ((protocol->p_cnct_version >= PROTOCOL_VERSION10 &&
|
||||
protocol->p_cnct_version <= PROTOCOL_VERSION15) &&
|
||||
protocol->p_cnct_version <= PROTOCOL_VERSION16) &&
|
||||
(protocol->p_cnct_architecture == arch_generic ||
|
||||
protocol->p_cnct_architecture == ARCHITECTURE) &&
|
||||
protocol->p_cnct_weight >= weight)
|
||||
|
Loading…
Reference in New Issue
Block a user