mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.Oracle/Oci8.cpp: added zero-length check to OracleClob
git-svn-id: svn://ultimatepp.org/upp/trunk@4101 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
1cd8f2c8e4
commit
bfb017762e
1 changed files with 4 additions and 0 deletions
|
|
@ -1490,6 +1490,8 @@ dword OracleBlob::Read(int64 at, void *ptr, dword size) {
|
|||
void OracleBlob::Write(int64 at, const void *ptr, dword size) {
|
||||
ASSERT(IsOpen() && (style & STRM_WRITE) && session);
|
||||
ASSERT(at == (dword)at);
|
||||
if(!size)
|
||||
return;
|
||||
ub4 n = size;
|
||||
int res = session->oci8.OCILobWrite(session->svchp, session->errhp, locp, &n, (dword)at + 1, (void *)ptr, size,
|
||||
OCI_ONE_PIECE, NULL, NULL, 0, SQLCS_IMPLICIT);
|
||||
|
|
@ -1596,6 +1598,8 @@ dword OracleClob::Read(int64 at, void *ptr, dword size) {
|
|||
void OracleClob::Write(int64 at, const void *ptr, dword size) {
|
||||
ASSERT(IsOpen() && (style & STRM_WRITE) && session);
|
||||
ASSERT(at == (dword)at);
|
||||
if(!size)
|
||||
return;
|
||||
bool utf8 = session->IsUtf8Session();
|
||||
if(at & 1) {
|
||||
char auxbuf[2];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue