File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -360,13 +360,13 @@ void Server::handle_connection(int client_fd) {
360360 // Row Description (T)
361361 if (!res.rows ().empty () && res.schema ().column_count () > 0 ) {
362362 const auto & schema = res.schema ();
363- const uint32_t num_cols = static_cast <uint32_t >(schema.column_count ());
363+ const auto num_cols = static_cast <uint32_t >(schema.column_count ());
364364
365365 // Calculate T packet length
366366 uint32_t t_len = 4 + 2 ; // len + num_cols
367367 for (uint32_t i = 0 ; i < num_cols; ++i) {
368- t_len +=
369- schema. get_column (i). name (). size () + 1 + 4 + 2 + 4 + 2 + 4 + 2 ;
368+ t_len += static_cast < uint32_t >(schema. get_column (i). name (). size ()) +
369+ 1 + 4 + 2 + 4 + 2 + 4 + 2 ;
370370 }
371371
372372 const char t_type = ' T' ;
Original file line number Diff line number Diff line change 66#include " transaction/transaction_manager.hpp"
77
88#include < algorithm>
9+ #include < cstddef>
910#include < memory>
1011#include < mutex>
1112#include < utility>
1213
1314#include " catalog/catalog.hpp"
15+ #include " executor/types.hpp"
1416#include " recovery/log_manager.hpp"
1517#include " recovery/log_record.hpp"
18+ #include " storage/buffer_pool_manager.hpp"
1619#include " storage/heap_table.hpp"
1720#include " transaction/lock_manager.hpp"
1821#include " transaction/transaction.hpp"
@@ -78,7 +81,7 @@ void TransactionManager::commit(Transaction* txn) {
7881 completed_transactions_.push_back (std::move (active_transactions_[txn->get_id ()]));
7982 static_cast <void >(active_transactions_.erase (txn->get_id ()));
8083
81- constexpr size_t MAX_COMPLETED = 100 ;
84+ constexpr std:: size_t MAX_COMPLETED = 100 ;
8285 if (completed_transactions_.size () > MAX_COMPLETED ) {
8386 completed_transactions_.pop_front ();
8487 }
@@ -113,7 +116,7 @@ void TransactionManager::abort(Transaction* txn) {
113116 completed_transactions_.push_back (std::move (active_transactions_[txn->get_id ()]));
114117 static_cast <void >(active_transactions_.erase (txn->get_id ()));
115118
116- constexpr size_t MAX_COMPLETED = 100 ;
119+ constexpr std:: size_t MAX_COMPLETED = 100 ;
117120 if (completed_transactions_.size () > MAX_COMPLETED ) {
118121 completed_transactions_.pop_front ();
119122 }
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ constexpr double PI_UPPER = 3.15;
4545constexpr int64_t VAL_1 = 1 ;
4646constexpr int64_t VAL_2 = 2 ;
4747constexpr int64_t VAL_10 = 10 ;
48-
48+ constexpr int64_t VAL_20 = 20 ;
4949constexpr int64_t VAL_25 = 25 ;
5050constexpr uint64_t STATS_100 = 100 ;
5151constexpr uint16_t PORT_5432 = 5432 ;
You can’t perform that action at this time.
0 commit comments