Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzmbrzl committed Oct 26, 2023
1 parent 2c95e8a commit 7a2cbff
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/backends/oracle/blob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ void oracle_blob_backend::reset()

if (res != OCI_SUCCESS)
{
std::cout << "Can't free/close LOB (is temporary: " << std::boolalpha << is_temporary << ") res: " << res << "\n";
std::cout << "Can't free/close LOB (is temporary: " << is_temporary << ") res: " << res << "\n";
throw_oracle_soci_error(res, session_.errhp_);
}

Expand All @@ -222,13 +222,31 @@ void oracle_blob_backend::ensure_initialized()
throw_oracle_soci_error(res, session_.errhp_);
}

res = OCILobIsTemporary(session_.envhp_, session_.errhp_, lobp_, &is_temporary);

if (res != OCI_SUCCESS)
{
throw_oracle_soci_error(res, session_.errhp_);
}

std::cout << "Is temporary immediately after creation as temporary: " << std::boolalpha << (is_temporary == TRUE) << std::endl;

res = OCILobOpen(session_.svchp_, session_.errhp_, lobp_, OCI_LOB_READWRITE);

if (res != OCI_SUCCESS)
{
throw_oracle_soci_error(res, session_.errhp_);
}

res = OCILobIsTemporary(session_.envhp_, session_.errhp_, lobp_, &is_temporary);

if (res != OCI_SUCCESS)
{
throw_oracle_soci_error(res, session_.errhp_);
}

std::cout << "Is temporary immediately after opening: " << std::boolalpha << (is_temporary == TRUE) << std::endl;

initialized_ = true;
}
}

0 comments on commit 7a2cbff

Please sign in to comment.