Comments (9)
UTF8 support is not very correct/complete yet. If you have time I can work with you on this and get it fixed.
{<<"NAME">>,'SQLT_CHR',30,0,0}
and
{<<"NAME">>,'SQLT_CHR',60,0,0}
are different size. May also be due to UTF8 issue. Can you please add a test case which I can try with?
from erloci.
@c-bik I am very grateful to you can do that !
I will add a test case soon : )
from erloci.
@homeway No problem at all!
from erloci.
hi @c-bik , can you tell me how you create your oracle instance and user grant for scott ?
I create a common utf8 instance, and don't through all test yet.
$ rebar eunit
==> erloci (eunit)
30:50.170934 [debug] {oci_logger,,66} ---- ERLOCI PORT PROCESS LOGGER ----
30:50.180668 [debug] {oci_port,,290} DYLD_LIBRARY_PATH = .../opt/oracle/instantclient_11_2
30:50.182460 [debug] {oci_port,,292} Extra Env :[{"NLS_LANG","GERMAN_SWITZERLAND.AL32UTF8"}]
30:50.182651 [debug] {oci_port,,302} Executable "/Users/homeway/erlang/research/erloci/priv/ocierl"
30:50.183020 [debug] {oci_port,,303} Options :[{packet,4},
binary,exit_status,use_stdio,
{args,["262144","true","59855"]},
{env,[{"DYLD_LIBRARY_PATH",
"/opt/oracle/instantclient_11_2:/opt/oracle/instantclient_11_2"},
{"NLS_LANG","GERMAN_SWITZERLAND.AL32UTF8"}]}]
30:50.183359 [debug] {oci_port,,314} started log enabled new port:
....
test/erloci_test.erl:204:<0.229.0>: 30:57.268086 +---------------------------------------------+
test/erloci_test.erl:205:<0.229.0>: 30:57.268219 | lob_test |
test/erloci_test.erl:206:<0.229.0>: 30:57.268291 +---------------------------------------------+
test/erloci_test.erl:223:<0.229.0>: 30:57.380745 created Directory alias /Users/homeway/erlang/research/erloci/.eunit
30:57.525790 [error] {c_src/erloci_lib/ocistmt.cpp,execute,277} failed OCIStmtExecute error ORA-00955: name is already used by an existing object
(create table lobs(clobd clob, blobd blob, nclobd nclob, bfiled bfile))
test/erloci_test.erl:241:<0.229.0>: 30:58.699049 truncated table lobs
test/erloci_test.erl:257:<0.229.0>: 30:59.505424 inserted 5 rows into lobs
30:59.667891 [error] {c_src/erloci_lib/ocistmt.cpp,rows,870} failed OCILobGetLength for 0x7fdf9a8e97f8 row 1 column 3 reason ORA-22288: file or LOB operation GETLENGTH failed
ϵͳ?Ҳ???ָ?????ļ???
(select * from lobs)
test/erloci_test.erl:648:<0.229.0>: 30:59.671079 +---------------------------------------------+
erloci_test: db_test_...test/erloci_test.erl:649:<0.229.0>: 30:59.671333 | describe_test |
*failed*
in function erloci_test:lob_test/1 (test/erloci_test.erl, line 262)
**error:{badmatch,{error,{22288,
<<"ORA-22288: file or LOB operation GETLENGTH failed\nϵ"...>>}}}
test/erloci_test.erl:650:<0.229.0>: 30:59.671482 +---------------------------------------------+
...
test/erloci_test.erl:813:<0.229.0>: 31:03.115105 +---------------------------------------------+
test/erloci_test.erl:814:<0.229.0>: 31:03.115272 | timestamp_interval_datatypes |
test/erloci_test.erl:815:<0.229.0>: 31:03.115347 +---------------------------------------------+
31:03.646087 [debug] {c_src/erloci_drv/command.cpp,exec_stmt,525} Bounds
31:04.063312 [debug] {c_src/erloci_drv/command.cpp,exec_stmt,525} Bounds
31:04.380905 [error] {c_src/erloci_lib/ocistmt.cpp,execute,277} failed OCIStmtExecute error ORA-00942: table or view does not exist
(drop table erloci_test_1)
=INFO REPORT==== 23-Apr-2015::21:31:04 ===
application: erloci
exited: stopped
type: temporary
=======================================================
Failed: 1. Skipped: 0. Passed: 54.
Cover analysis: /Users/homeway/erlang/research/erloci/.eunit/index.html
ERROR: One or more eunit tests failed.
ERROR: eunit failed while processing /Users/homeway/erlang/research/erloci: rebar_abort
from erloci.
lob_test
only works for a localhost Oracle Server with matching folder permission.
from erloci.
ok, I try it continue
from erloci.
@homeway accidental close?
from erloci.
@c-bik thanks for your help !
I tried some cases for utf8:
- insert utf8 string and select it in test case
- insert utf8 string from sqldeveloper and select it in test case
Then I found all the test passed ( I commented lob_test ).
So I guess my problem only happened with legacy database : )
from erloci.
Ok.
So that can not be solved by erloci, but perhaps the detection and handling of encoding can be improved or made more transparent (other than utf8 that is). It will be great if you can bring in some legacy support (like your scenario) into erloci. More erloci users will be benefited.
I am assuming this issue closed.
from erloci.
Related Issues (20)
- Add support to cancel long running statements.
- add optional client identifier support
- fetch_rows called without executing stmt results in cryptic error
- Hour,Minutes,Seconds increased by 1 HOT 1
- Unoptimized oci_util:to_num
- Error starting a session HOT 1
- Continuous Query Notification (CQN) support
- 008741 Debugging API for erloci port implementation
- Memory Leak HOT 1
- reading RAW fields is truncating at byte 0
- query execute failure on SBS test installation HOT 2
- add support for fetch_rows(N, WaitTime)
- Error reading CLOB in logger_log HOT 1
- Timestamp fractional seconds internal oracle representation. HOT 5
- DB NULL should be distinguishable in row values
- Add support to edit CLOBS HOT 2
- Length param isn't respected in Stmt:lob(LobId, Offset, Length) HOT 1
- One failed query can prevent future queries working
- Using SQLT_VNU as an in out parameter fails
- Argument error using OTP 22 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from erloci.