From 5e30bef674acced48d419f44b5d1e70ed6c5a8e7 Mon Sep 17 00:00:00 2001 From: Rahim Kanji Date: Sat, 26 Jul 2025 00:02:06 +0500 Subject: [PATCH] Few fixes --- lib/PgSQL_PreparedStatement.cpp | 2 +- lib/PgSQL_Protocol.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PgSQL_PreparedStatement.cpp b/lib/PgSQL_PreparedStatement.cpp index 460b2ea4e..7fc66f87e 100644 --- a/lib/PgSQL_PreparedStatement.cpp +++ b/lib/PgSQL_PreparedStatement.cpp @@ -263,7 +263,7 @@ void PgSQL_STMTs_local_v14::client_insert(uint64_t global_stmt_id, const std::st #ifdef DEBUG auto range = global_id_to_stmt_names.equal_range(global_stmt_id); for (auto it = range.first; it != range.second; ++it) { - assert(it->second == client_stmt_name && "client_stmt_name is already mapped to global_stmt_id in global_id_to_stmt_names"); // Should not happen, as we expect unique client_stmt_name per global_stmt_id + assert(it->second != client_stmt_name && "client_stmt_name is already mapped to global_stmt_id in global_id_to_stmt_names"); // Should not happen, as we expect unique client_stmt_name per global_stmt_id } #endif global_id_to_stmt_names.emplace(global_stmt_id, client_stmt_name); diff --git a/lib/PgSQL_Protocol.cpp b/lib/PgSQL_Protocol.cpp index 0b408952f..48b90d824 100644 --- a/lib/PgSQL_Protocol.cpp +++ b/lib/PgSQL_Protocol.cpp @@ -763,7 +763,7 @@ EXECUTION_STATE PgSQL_Protocol::process_handshake_response_packet(unsigned char* return EXECUTION_STATE::FAILED; } - assert((hdr.data.size - 1) > 0); + assert(hdr.data.size > 0); if (hdr.type != (*myds)->auth_next_pkt_type) { return EXECUTION_STATE::FAILED;