Skip to content

Commit d1d02a1

Browse files
RUST-1844 Consolidate server ID fields in ConnectionInfo (#1041)
1 parent c0e9335 commit d1d02a1

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/cmap/conn.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,7 @@ pub struct ConnectionInfo {
4646

4747
/// A server-generated identifier that uniquely identifies the connection. Available on server
4848
/// versions 4.2+. This may be used to correlate driver connections with server logs.
49-
/// If the connection ID sent by the server is too large for an i32, this will be a truncated
50-
/// value.
51-
pub server_id: Option<i32>,
52-
53-
/// A server-generated identifier that uniquely identifies the connection. Available on server
54-
/// versions 4.2+. This may be used to correlate driver connections with server logs. This
55-
/// value will not be truncated and should be used rather than `server_id`.
56-
pub server_id_i64: Option<i64>,
49+
pub server_id: Option<i64>,
5750

5851
/// The address that the connection is connected to.
5952
pub address: ServerAddress,
@@ -188,8 +181,7 @@ impl Connection {
188181
pub(crate) fn info(&self) -> ConnectionInfo {
189182
ConnectionInfo {
190183
id: self.id,
191-
server_id: self.server_id.map(|value| value as i32),
192-
server_id_i64: self.server_id,
184+
server_id: self.server_id,
193185
address: self.address.clone(),
194186
}
195187
}

0 commit comments

Comments
 (0)