Skip to content

Commit

Permalink
pgsql: remove unused msg field
Browse files Browse the repository at this point in the history
The `ConsolidatedDataRow` struct had a `length` field that wasn't truly
used.

Related to
Bug OISF#6389

(cherry picked from commit 1afb485)
  • Loading branch information
jufajardini authored and victorjulien committed Dec 21, 2023
1 parent 32160f4 commit 046a18b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion rust/src/pgsql/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ fn log_response(res: &PgsqlBEMessage, jb: &mut JsonBuilder) -> Result<(), JsonEr
}
PgsqlBEMessage::ConsolidatedDataRow(ConsolidatedDataRowPacket {
identifier: _,
length: _,
row_cnt,
data_size,
}) => {
Expand Down
2 changes: 0 additions & 2 deletions rust/src/pgsql/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ pub struct BackendKeyDataMessage {
#[derive(Debug, PartialEq, Eq)]
pub struct ConsolidatedDataRowPacket {
pub identifier: u8,
pub length: u32,
pub row_cnt: u16,
pub data_size: u64,
}
Expand Down Expand Up @@ -924,7 +923,6 @@ pub fn parse_consolidated_data_row(i: &[u8]) -> IResult<&[u8], PgsqlBEMessage> {
Ok((i, PgsqlBEMessage::ConsolidatedDataRow(
ConsolidatedDataRowPacket {
identifier,
length,
row_cnt: 1,
data_size: add_up_data_size(rows),
}
Expand Down
1 change: 0 additions & 1 deletion rust/src/pgsql/pgsql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,6 @@ impl PgsqlState {
let dummy_resp =
PgsqlBEMessage::ConsolidatedDataRow(ConsolidatedDataRowPacket {
identifier: b'D',
length: tx.get_row_cnt() as u32, // TODO this is ugly. We can probably get rid of `length` field altogether...
row_cnt: tx.get_row_cnt(),
data_size: tx.data_size, // total byte count of all data_row messages combined
});
Expand Down

0 comments on commit 046a18b

Please sign in to comment.