John Scoles wrote: > Thank Charles that is really good stuff > > I have not investigated the > > NLS_LANG=.WE8ISO8859P1, but the tests 30long.t and 31lob_extended.t > still fail badly if NLS_LANG=.AL32UTF8. > > bug yet as my local test box is just US7ASCII. > > BTW can you tell me what the ' > > NLS_CHARACTERSET and > > NLS_NCHAR_CHARACTERSET > > setting of your Oralcle DB you are testing on > > > I will have to do that later today or tonight as I have to install a > different version or Oracle to get that to fail (I hope) > > If you can set $dbh->{dbd_verbose}=15 just before the test start to fail in > > 30long.t and 31lob_extended.t > > and send me the results I will have something more to go on. > > > Look for another RC in the next day or two. > > Cheers > > Jardine wrote: >> On 14/01/10 12:19, Charles Jardine wrote: >>> On 12/01/10 12:07, John Scoles wrote: >>>> Ok third time is a Charm >>>> >>>> The Third RC of the beer edition of DBD::Oracle 1.24 can be found at >>>> >>>> >>>> http://svn.perl.org/modules/dbd-oracle/trunk/DBD-Oracle-1.24-RC3.tar >>>> >>>> >>>> This round has a few little patches from Martin Evans on it. >>>> >>>> >>>> Please test and enjoy >>> >>> My environment is Linux x86-64, Perl 5.10.1 (64 bit), DBI 1.609, >>> Oracle 10.2.0.4.2 (64 bit). Database charset UTF8, national >>> charset AL16UTF16 >>> >>> Three things: >> >> [snip] >> >>> 3. Here is a patch which removes the remaining warnings detected by >>> gcc in 64-bit mode. >> >> [snip] >> >> I realise that something has wrapped the very long lines in the patch, >> so I am trying again, sending the patch as an attachment. >> > > For me tests 40long.t and 30lob_extended.t also fail when $NLS_LANG is AMERICAN_AMERICA.AL32UTF8. The values of NLS_CHARACTERSET and NLS_NCHAR_CHARACTERSET in my database are:
AL32UTF8 and UTF8 as the test output below shows. The errors I get are: prove -vb t/30long.t t/30long.t .. 1..479 # ora_server_version: 11 1 0 6 0 # Database 11.1.0.6.0 CHAR set is AL32UTF8 (Unicode), NCHAR set is UTF8 (Unicode) # Client 11.1.0.6 NLS_LANG is 'AMERICAN_AMERICA.AL32UTF8', NLS_NCHAR is '<unset>' # # ========================================================================= # Running long test for LONG (0) use_utf8_data=0 # create table dbd_ora__drop_me ( idx integer, lng LONG, dt date ) # long_data[0] length 10240 # long_data[1] length 81920 # long_data[2] length 71680 # --- insert some LONG data (ora_type 0) ok 1 - prepare: insert into dbd_ora__drop_me values (?, ?, SYSDATE) ok 2 - insert long data 40 ok 3 - insert long data 41 ok 4 - insert long data 42 ok 5 - insert long data undef 43 # --- fetch LONG data back again -- truncated - LongTruncOk == 1 # LongReadLen 20, LongTruncOk 1 ok 6 - prepare: select * from dbd_ora__drop_me order by idx ok 7 - execute: select * from dbd_ora__drop_me order by idx ok 8 - fetch_arrayref for select * from dbd_ora__drop_me order by idx ok 9 - four rows ok 10 - byte_string test of truncated to LongReadLen 20 ok 11 - nice_string test of truncated to LongReadLen 20 ok 12 - LONG UTF8 setting ok 13 - byte_string test of truncated to LongReadLen 20 ok 14 - nice_string test of truncated to LongReadLen 20 ok 15 - LONG UTF8 setting ok 16 - byte_string test of truncated to LongReadLen 20 ok 17 - nice_string test of truncated to LongReadLen 20 ok 18 - LONG UTF8 setting ok 19 - last row undefined ok 20 - prepare select * from dbd_ora__drop_me order by idx # --- fetch LONG data back again -- truncated - LongTruncOk == 0 # LongReadLen 81910, LongTruncOk ok 21 - execute select * from dbd_ora__drop_me order by idx ok 22 - fetchrow_arrayref select * from dbd_ora__drop_me order by idx ok 23 - length tmp->[1] 10240 ok 24 - truncation error not triggered (LongReadLen 81910, data 10240) ok 25 - tmp==1406 || tmp==24345 tmp actually=24345 # --- fetch LONG data back again -- complete - LongTruncOk == 0 # LongReadLen 82920, LongTruncOk ok 26 - prepare: select * from dbd_ora__drop_me order by idx ok 27 - execute select * from dbd_ora__drop_me order by idx ok 28 - fetchrow_arrayref select * from dbd_ora__drop_me order by idx ok 29 - Strings are identical, Len 10240 ok 30 - fetchrow_arrayref select * from dbd_ora__drop_me order by idx ok 31 - Strings are identical, Len 10240 ok 32 - fetchrow_arrayref select * from dbd_ora__drop_me order by idx ok 33 - Strings are identical, Len 10240 ok 34 # skip blob_read tests for LONGs - not currently supported <snipped - all the same> ok 94 # skip ora_auto_lob tests for LONGs - not supported # # ========================================================================= # Running long test for LONG RAW (24) use_utf8_data=0 ok 95 - prepare: insert into dbd_ora__drop_me values (?, ?, SYSDATE) # create table dbd_ora__drop_me ( idx integer, lng LONG RAW, dt date ) # long_data[0] length 20480 # long_data[1] length 81920 # long_data[2] length 71680 # --- insert some LONG RAW data (ora_type 24) ok 96 - insert long data 40 ok 97 - insert long data 41 ok 98 - insert long data 42 ok 99 - insert long data undef 43 # --- fetch LONG RAW data back again -- truncated - LongTruncOk == 1 # LongReadLen 20, LongTruncOk 1 ok 100 - prepare: select * from dbd_ora__drop_me order by idx ok 101 - execute: select * from dbd_ora__drop_me order by idx ok 102 - fetch_arrayref for select * from dbd_ora__drop_me order by idx ok 103 - four rows ok 104 - byte_string test of truncated to LongReadLen 40 ok 105 - nice_string test of truncated to LongReadLen 40 ok 106 - LONG RAW UTF8 setting ok 107 - byte_string test of truncated to LongReadLen 40 ok 108 - nice_string test of truncated to LongReadLen 40 ok 109 - LONG RAW UTF8 setting ok 110 - byte_string test of truncated to LongReadLen 40 ok 111 - nice_string test of truncated to LongReadLen 40 ok 112 - LONG RAW UTF8 setting ok 113 - last row undefined ok 114 - prepare select * from dbd_ora__drop_me order by idx # --- fetch LONG RAW data back again -- truncated - LongTruncOk == 0 # LongReadLen 40955, LongTruncOk ok 115 - execute select * from dbd_ora__drop_me order by idx ok 116 - fetchrow_arrayref select * from dbd_ora__drop_me order by idx ok 117 - length tmp->[1] 20480 ok 118 - truncation error not triggered (LongReadLen 40955, data 20480) ok 119 - tmp==1406 || tmp==24345 tmp actually=24345 # --- fetch LONG RAW data back again -- complete - LongTruncOk == 0 # LongReadLen 82920, LongTruncOk ok 120 - prepare: select * from dbd_ora__drop_me order by idx ok 121 - execute select * from dbd_ora__drop_me order by idx ok 122 - fetchrow_arrayref select * from dbd_ora__drop_me order by idx ok 123 - Strings are identical, Len 20480 ok 124 - fetchrow_arrayref select * from dbd_ora__drop_me order by idx ok 125 - Strings are identical, Len 81920 ok 126 - fetchrow_arrayref select * from dbd_ora__drop_me order by idx ok 127 - Strings are identical, Len 71680 ok 128 # skip blob_read tests for LONGs - not currently supported <snipped all the same> ok 188 # skip ora_auto_lob tests for LONG RAWs - not supported # # ========================================================================= # Running long test for NCLOB (112) use_utf8_data=1 # create table dbd_ora__drop_me ( idx integer, lng NCLOB, dt date ) # long_data[0] length 10240 ok 189 - prepare: insert into dbd_ora__drop_me values (?, ?, SYSDATE) # long_data[1] length 81920 # long_data[2] length 71680 # --- insert some NCLOB data (ora_type 112) ok 190 - insert long data 40 ok 191 - insert long data 41 ok 192 - insert long data 42 ok 193 - insert long data undef 43 # --- fetch NCLOB data back again -- truncated - LongTruncOk == 1 # LongReadLen 20, LongTruncOk 1 ok 194 - prepare: select * from dbd_ora__drop_me order by idx ok 195 - execute: select * from dbd_ora__drop_me order by idx DBD::Oracle has returned a NEED_DATA status when doing a LobRead!! DBD::Oracle::db disconnect failed: ORA-03127: no new operations allowed until the active operation ends (DBD ERROR: OCISessionEnd) at t/30long.t line 68. # Looks like you planned 479 tests but ran 195. # Looks like your test exited with 255 just after 195. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 284/479 subtests (less 122 skipped subtests: 73 okay) Test Summary Report ------------------- t/30long.t (Wstat: 65280 Tests: 195 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 479 tests but ran 195. Files=1, Tests=195, 0 wallclock secs ( 0.04 usr 0.00 sys + 0.12 cusr 0.01 csys = 0.17 CPU) Result: FAIL It is similar with 31lob_extended.t but as it is a shorter test and it is easier to segregate the failure I've concentrated on that. I commented out the first section of bracketed tests in 31lob_extended.t and left the remaining one which fails. The output is: prove -vb t/31lob_extended.t t/31lob_extended.t .. 1..31 ok 1 - created test table # create table dbd_ora__drop_me ( idx integer, x clob, dt date ) ok 2 - created test data ok 3 - created test procedure ok 4 - ora_auto_lobs not fetching prepare call proc ok 5 - ora_auto_lobs not fetching - bind out cursor ok 6 - ora_auto_lobs not fetching - execute to get out cursor DBD::Oracle has returned a NEED_DATA status when doing a LobRead!! procedure p_DBD_Oracle_drop_me possibly not dropped- check - DBD::Oracle::db do failed: ORA-03127: no new operations allowed until the active operation ends (DBD ERROR: OCIStmtExecute) [for Statement "drop procedure p_DBD_Oracle_drop_me"] at t/31lob_extended.t line 175. table dbd_ora__drop_me possibly not dropped - check - DBD::Oracle::db do failed: ORA-03127: no new operations allowed until the active operation ends (DBD ERROR: OCIStmtExecute) [for Statement " drop table dbd_ora__drop_me "] at t/nchar_test_lib.pl line 204. # Looks like you planned 31 tests but ran 6. # Looks like your test exited with 255 just after 6. DBD::Oracle::db DESTROY failed: ORA-03127: no new operations allowed until the active operation ends (DBD ERROR: OCIStmtExecute) ORA-03127: no new operations allowed until the active operation ends (DBD ERROR: OCISessionEnd) at t/31lob_extended.t line 91. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 25/31 subtests Test Summary Report ------------------- t/31lob_extended.t (Wstat: 65280 Tests: 6 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 31 tests but ran 6. Files=1, Tests=6, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.05 cusr 0.01 csys = 0.08 CPU) Result: FAIL With verbose turned on I get the attached output. This is not actually causing me a problem right now as it only seems to happen when ora_auto_lob is on (default) and we mostly disable it. Please let me know if there is anything else I can provide or do to help nail this one. Martin -- Martin J. Evans Easysoft Limited http://www.easysoft.com
prove -vb t/31lob_extended.t t/31lob_extended.t .. 1..31 ok 1 - created test table # create table dbd_ora__drop_me ( idx integer, x clob, dt date ) ok 2 - created test data ok 3 - created test procedure ok 4 - ora_auto_lobs not fetching prepare call proc ok 5 - ora_auto_lobs not fetching - bind out cursor dbd_preparse scanned 1 distinct placeholders OCIHandleAlloc(88e6d18,8957020,OCI_HTYPE_STMT,0,0)=SUCCESS OCIStmtPrepare(8929184,8914e30,'begin p_DBD_Oracle_drop_me(:p1); end;',37,1,0)=SUCCESS OCIAttrGet(8929184,OCI_HTYPE_STMT,895702c,0,OCI_ATTR_STMT_TYPE,8914e30)=SUCCESS dbd_st_prepare'd sql BEGIN (pl1, auto_lob1, check_sql1) dbd_describe skipped for BEGIN dbd_bind_ph(): bind :p1 <== undef (type 0 (DEFAULT (varchar)), inout 0x8863840, maxlen 500, attribs: HASH(0x8954d28)) dbd_rebind_ph() (1): rebinding :p1 as NULL (not-utf8, ftype 116 (SQLT_RSET OCI 8 cursor variable), csid 0, csform 0(0), inout 1) dbd_rebind_ph_rset phs->is_inout=1 rebind :p1 done with ftype 116 (SQLT_RSET OCI 8 cursor variable) dbd_st_execute BEGIN (out1, lob0)... pp_exec_rset bind :p1 - allocating new sth... OCIHandleAlloc(88e6d18,8957310,OCI_HTYPE_STMT,0,0)=SUCCESS OCIBindByName(8929184,895730c,8914e30,":p1",placeh_len=3,value_p=8957310,value_sz=0,dty=116,indp=0,alenp=0,rcodep=0,maxarr_len=0,curelep=0 (*=0),mode=DEFAULT,0)=SUCCESS pp_exec_rset bind :p1 - allocated DBI::st=HASH(0x8954af8)... Statement Execute Mode is 32 (COMMIT_ON_SUCCESS) ok 6 - ora_auto_lobs not fetching - execute to get out cursor OCIStmtExecute(8914db8,8929184,8914e30,1,0,0,0,mode=COMMIT_ON_SUCCESS,32)=SUCCESS OCIAttrGet(8929184,OCI_HTYPE_STMT,bff7b108,0,OCI_ATTR_ROW_COUNT,8914e30)=SUCCESS OCIAttrGet(8929184,OCI_HTYPE_STMT,bff7b10c,0,OCI_ATTR_SQLFNCODE,8914e30)=SUCCESS dbd_st_execute BEGIN returned (SUCCESS, rpc1, fn34, out1) dbd_st_execute(): Analyzing inout parameter ':p1 of type=116' bind :p1 - initialising new DBI::st=HASH(0x8954af8) for cursor 0x8957310... dbd_describe SELECT (implicit, lb 7000)... OCIAttrGet(8928d10,OCI_HTYPE_STMT,bff7aea8,0,OCI_ATTR_PARAM_COUNT,8914e30)=SUCCESS OCIParamGet(8928d10,4,8914e30,895e5a8,1,OCI_HTYPE_STMT)=SUCCESS OCIAttrGet(89275f4,OCI_DTYPE_PARAM,895e5c4,0,OCI_ATTR_DATA_TYPE,8914e30)=SUCCESS OCIAttrGet(89275f4,OCI_DTYPE_PARAM,895e5c6,0,OCI_ATTR_DATA_SIZE,8914e30)=SUCCESS OCIAttrGet(89275f4,OCI_DTYPE_PARAM,895e5d4,0,OCI_ATTR_CHAR_USED,8914e30)=SUCCESS OCIAttrGet(89275f4,OCI_DTYPE_PARAM,895e5d6,0,OCI_ATTR_CHAR_SIZE,8914e30)=SUCCESS OCIAttrGet(89275f4,OCI_DTYPE_PARAM,895e5d8,0,OCI_ATTR_CHARSET_ID,8914e30)=SUCCESS OCIAttrGet(89275f4,OCI_DTYPE_PARAM,895e5da,0,OCI_ATTR_CHARSET_FORM,8914e30)=SUCCESS OCIAttrGet(89275f4,OCI_DTYPE_PARAM,895e5c8,0,OCI_ATTR_PRECISION,8914e30)=SUCCESS OCIAttrGet(89275f4,OCI_DTYPE_PARAM,895e5ca,0,OCI_ATTR_SCALE,8914e30)=SUCCESS OCIAttrGet(89275f4,OCI_DTYPE_PARAM,895e5cb,0,OCI_ATTR_IS_NULL,8914e30)=SUCCESS OCIAttrGet(89275f4,OCI_DTYPE_PARAM,895e5cc,bff7ae84,OCI_ATTR_NAME,8914e30)=SUCCESS Describe col #1 type=112(SQLT_CLOB / long) OCIDescriptorAlloc(88e6d18,895e5b0,OCI_DTYPE_LOB,0,0) Described col 1: dbtype 112(SQLT_CLOB / long), scale 0, prec 0, nullok 1, name X : dbsize 4000, char_used 0, char_size 0, csid 873, csform 1(SQLCS_IMPLICIT), disize 4 fbh 1: 'X' NULLable, otype 112->112, dbsize 4000/4, p0.s0 OCIAttrSet(8928d10,OCI_HTYPE_STMT, bff7ac70,4,Attr=OCI_ATTR_PREFETCH_MEMORY,8914e30)=SUCCESS OCIAttrSet(8928d10,OCI_HTYPE_STMT, bff7ac6c,4,Attr=OCI_ATTR_PREFETCH_ROWS,8914e30)=SUCCESS cache settings DB Handle RowCacheSize=0,Statement Handle RowCacheSize=0, OCI_ATTR_PREFETCH_ROWS=1, OCI_ATTR_PREFETCH_MEMORY=0, Rows per Fetch=1, Multiple Row Fetch=Off OCIDefineByPos(8928d10,895e5ac,8914e30,1,895e5b0,0,112,895e458,89548b8,8954558,mode=DEFAULT,0)=SUCCESS dbd_describe'd 1 columns (row bytes: 4000 max, 4000 est avg, cache: 0) dbd_st_fetch 1 fields... OCIStmtFetch(8928d10,8914e30,1,2,0)=SUCCESS dbd_st_fetched 1 fields with status of 0(SUCCESS) field #1 with rc=0(OK) OCILobGetLength(8914db8,8914e30,8927548,bff7ad38)=SUCCESS OCILobCharSetForm(88e6d18,8914e30,8927548,1)=SUCCESS OCILobRead(8914db8,8914e30,8927548,bff7ad30,1,8967468,6000,0,0,0,1)=NEED_DATA DBD::Oracle has returned a NEED_DATA status when doing a LobRead!! dbd_st_destroy OCIHandleFree(8929184,OCI_HTYPE_STMT)=SUCCESS dbd_st_finish OCIStmtFetch(8928d10,8914e30,0,2,0)=SUCCESS dbd_st_destroy OCIHandleFree(8928d10,OCI_HTYPE_STMT)=SUCCESS OCIDescriptorFree(8927548,OCI_DTYPE_LOB) OCIHandleAlloc(88e6d18,8957020,OCI_HTYPE_STMT,0,0)=SUCCESS OCIStmtPrepare(892914c,8914e30,'drop procedure p_DBD_Oracle_drop_me',35,1,0)=SUCCESS OCIAttrGet(892914c,OCI_HTYPE_STMT,895702c,0,OCI_ATTR_STMT_TYPE,8914e30)=SUCCESS dbd_st_prepare'd sql DROP (pl1, auto_lob1, check_sql1) dbd_describe skipped for DROP dbd_st_execute DROP (out0, lob0)... Statement Execute Mode is 32 (COMMIT_ON_SUCCESS) OCIStmtExecute(8914db8,892914c,8914e30,1,0,0,0,mode=COMMIT_ON_SUCCESS,32)=ERROR OCIAttrGet(892914c,OCI_HTYPE_STMT,bff7a9a6,0,OCI_ATTR_PARSE_ERROR_OFFSET,8914e30)=SUCCESS OCIErrorGet(8914e30,1,"<NULL>",bff7a5a0,"ORA-03127: no new operations allowed until the active operation ends ",1024,2)=SUCCESS OCIErrorGet(8914e30,2,"<NULL>",bff7a5a0,"ORA-03127: no new operations allowed until the active operation ends ",1024,2)=NO_DATA dbd_st_destroy OCIHandleFree(892914c,OCI_HTYPE_STMT)=SUCCESS procedure p_DBD_Oracle_drop_me possibly not dropped- check - DBD::Oracle::db do failed: ORA-03127: no new operations allowed until the active operation ends (DBD ERROR: OCIStmtExecute) [for Statement "drop procedure p_DBD_Oracle_drop_me"] at t/31lob_extended.t line 175. OCIHandleAlloc(88e6d18,8964438,OCI_HTYPE_STMT,0,0)=SUCCESS OCIStmtPrepare(892914c,8914e30,' drop table dbd_ora__drop_me ',29,1,0)=SUCCESS OCIAttrGet(892914c,OCI_HTYPE_STMT,8964444,0,OCI_ATTR_STMT_TYPE,8914e30)=SUCCESS dbd_st_prepare'd sql DROP (pl1, auto_lob1, check_sql1) dbd_describe skipped for DROP dbd_st_execute DROP (out0, lob0)... Statement Execute Mode is 32 (COMMIT_ON_SUCCESS) OCIStmtExecute(8914db8,892914c,8914e30,1,0,0,0,mode=COMMIT_ON_SUCCESS,32)=ERROR OCIAttrGet(892914c,OCI_HTYPE_STMT,bff7a9a6,0,OCI_ATTR_PARSE_ERROR_OFFSET,8914e30)=SUCCESS OCIErrorGet(8914e30,1,"<NULL>",bff7a5a0,"ORA-03127: no new operations allowed until the active operation ends ",1024,2)=SUCCESS OCIErrorGet(8914e30,2,"<NULL>",bff7a5a0,"ORA-03127: no new operations allowed until the active operation ends ",1024,2)=NO_DATA dbd_st_destroy OCIHandleFree(892914c,OCI_HTYPE_STMT)=SUCCESS table dbd_ora__drop_me possibly not dropped - check - DBD::Oracle::db do failed: ORA-03127: no new operations allowed until the active operation ends (DBD ERROR: OCIStmtExecute) [for Statement " drop table dbd_ora__drop_me "] at t/nchar_test_lib.pl line 204. # Looks like you planned 31 tests but ran 6. # Looks like your test exited with 255 just after 6. OCISessionEnd(8914db8,8914e30,8942c90,mode=DEFAULT 0)=ERROR OCIErrorGet(8914e30,1,"<NULL>",bff7a6b0,"ORA-03127: no new operations allowed until the active operation ends ",1024,2)=SUCCESS OCIErrorGet(8914e30,2,"<NULL>",bff7a6b0,"ORA-03127: no new operations allowed until the active operation ends ",1024,2)=NO_DATA OCIServerDetach(8915534,8914e30,mode=DEFAULT,0)=SUCCESS OCIHandleFree(8942c90,OCI_HTYPE_SESSION)=SUCCESS OCIHandleFree(8915534,OCI_HTYPE_SERVER)=SUCCESS OCIHandleFree(8914db8,OCI_HTYPE_SVCCTX)=SUCCESS OCIHandleFree(8914e30,OCI_HTYPE_ERROR)=SUCCESS DBD::Oracle::db DESTROY failed: ORA-03127: no new operations allowed until the active operation ends (DBD ERROR: OCIStmtExecute) ORA-03127: no new operations allowed until the active operation ends (DBD ERROR: OCISessionEnd) at t/31lob_extended.t line 91. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 25/31 subtests Test Summary Report ------------------- t/31lob_extended.t (Wstat: 65280 Tests: 6 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 31 tests but ran 6. Files=1, Tests=6, 1 wallclock secs ( 0.02 usr 0.01 sys + 0.05 cusr 0.01 csys = 0.09 CPU) Result: FAIL