diff --git a/src/remote/client/interface.cpp b/src/remote/client/interface.cpp index 6a36da1a86..d4c88583f2 100644 --- a/src/remote/client/interface.cpp +++ b/src/remote/client/interface.cpp @@ -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()); diff --git a/src/remote/inet.cpp b/src/remote/inet.cpp index 55c923c975..5a1273651d 100644 --- a/src/remote/inet.cpp +++ b/src/remote/inet.cpp @@ -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); diff --git a/src/remote/os/win32/wnet.cpp b/src/remote/os/win32/wnet.cpp index 6af1d51371..0b4bbcff01 100644 --- a/src/remote/os/win32/wnet.cpp +++ b/src/remote/os/win32/wnet.cpp @@ -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); diff --git a/src/remote/os/win32/xnet.cpp b/src/remote/os/win32/xnet.cpp index dd238f9a11..8533aee3ca 100644 --- a/src/remote/os/win32/xnet.cpp +++ b/src/remote/os/win32/xnet.cpp @@ -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); diff --git a/src/remote/protocol.cpp b/src/remote/protocol.cpp index d9b8213fb5..4cc06be3e4 100644 --- a/src/remote/protocol.cpp +++ b/src/remote/protocol.cpp @@ -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); diff --git a/src/remote/protocol.h b/src/remote/protocol.h index bf7a24197d..c33ff0a818 100644 --- a/src/remote/protocol.h +++ b/src/remote/protocol.h @@ -84,9 +84,14 @@ const USHORT PROTOCOL_VERSION14 = (FB_PROTOCOL_FLAG | 14); // Protocol 15: // - supports crypt key callback at connect phase + +const USHORT PROTOCOL_VERSION15 = (FB_PROTOCOL_FLAG | 15); + +// Protocol 16: // - supports statement timeouts -const USHORT PROTOCOL_VERSION15 = (FB_PROTOCOL_FLAG | 15); +const USHORT PROTOCOL_VERSION16 = (FB_PROTOCOL_FLAG | 16); +const USHORT PROTOCOL_STMT_TOUT = PROTOCOL_VERSION16; // Architecture types diff --git a/src/remote/server/server.cpp b/src/remote/server/server.cpp index 398fb66859..6bedf24301 100644 --- a/src/remote/server/server.cpp +++ b/src/remote/server/server.cpp @@ -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)