diff --git a/src/backends/postgresql/soci-postgresql.h b/src/backends/postgresql/soci-postgresql.h index ffa1b2896..1508f9b29 100644 --- a/src/backends/postgresql/soci-postgresql.h +++ b/src/backends/postgresql/soci-postgresql.h @@ -256,7 +256,7 @@ struct postgresql_session_backend : details::session_backend struct postgresql_backend_factory : backend_factory { - postgresql_backend_factory() {} + postgresql_backend_factory() {} virtual postgresql_session_backend * make_session( std::string const & connectString) const; }; diff --git a/src/backends/postgresql/test/test-postgresql.cpp b/src/backends/postgresql/test/test-postgresql.cpp index aea6b7522..9415e0e75 100644 --- a/src/backends/postgresql/test/test-postgresql.cpp +++ b/src/backends/postgresql/test/test-postgresql.cpp @@ -556,15 +556,15 @@ struct bytea_table_creator : public table_creator_base void test_bytea() { - { + { session sql(backEnd, connectString); - bytea_table_creator tableCreator(sql); + bytea_table_creator tableCreator(sql); int v = 0x0A0B0C0D; unsigned char* b = reinterpret_cast(&v); std::string data; std::copy(b, b + sizeof(v), std::back_inserter(data)); - { + { sql << "insert into soci_test(val) values(:val)", use(data); @@ -583,7 +583,7 @@ void test_bytea() std::string bin2 = r.get(0); assert(bin2 == "\\x0d0c0b0a"); } - } + } std::cout << "test bytea passed" << std::endl; } diff --git a/src/core/statement.cpp b/src/core/statement.cpp index f9f7afd14..8bb8a79ef 100644 --- a/src/core/statement.cpp +++ b/src/core/statement.cpp @@ -507,11 +507,11 @@ bool statement_impl::resize_intos(std::size_t upperBound) // this function does not need to take into account the intosForRow_ // elements, since they are never used for bulk operations - int rows = backEnd_->get_number_of_rows(); - if (rows < 0) - { - rows = 0; - } + int rows = backEnd_->get_number_of_rows(); + if (rows < 0) + { + rows = 0; + } if (upperBound != 0 && upperBound < static_cast(rows)) { rows = static_cast(upperBound);