We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Table:
create table raw_clob(col_raw raw(2000))
Note: data is corrupted when read through select!
StmtInsert = OciSession:prep_sql(<<"insert into raw_clob (col_raw) values (:col_raw)">>). ok = StmtInsert:bind_vars([{<<":col_raw">>, 'SQLT_BIN'}]). Data = <<1,2,3,4,0,0,0,5,6,7,8>>, {rowids, [_]} = StmtInsert:exec_stmt([{Data}]). SelStmt = OciSession:prep_sql("select col_raw from raw_clob"). > {cols, _} = SelStmt:exec_stmt(). {cols,[{<<"COL_RAW">>,'SQLT_BIN',2000,0,0}]} > SelStmt:fetch_rows(100). {{rows,[[<<1,2,3,4>>]]},true}
cur_clm.dlen + 1
raw_clob
erloci/c_src/erloci_lib/ocistmt.cpp
Lines 479 to 484 in 49557db
OCIAttrGet(OCI_DTYPE_PARAM, OCI_ATTR_DATA_SIZE)
cur_clm.dlen
Lines 398 to 400 in 49557db
strlen
Lines 974 to 982 in 49557db
\0
The text was updated successfully, but these errors were encountered:
c-bik
Successfully merging a pull request may close this issue.
Create Table:
Note: data is corrupted when read through select!
Root Cause
cur_clm.dlen + 1
is used to allocate buffer for RAW which is always (for theraw_clob
table above) 2000.erloci/c_src/erloci_lib/ocistmt.cpp
Lines 479 to 484 in 49557db
OCIAttrGet(OCI_DTYPE_PARAM, OCI_ATTR_DATA_SIZE)
API to get the value incur_clm.dlen
erloci/c_src/erloci_lib/ocistmt.cpp
Lines 398 to 400 in 49557db
strlen
is used inerloci/c_src/erloci_lib/ocistmt.cpp
Lines 974 to 982 in 49557db
\0
as string termination character)The text was updated successfully, but these errors were encountered: