On 10 March 2011 10:09, John Scoles <byter...@hotmail.com> wrote: > CSID in this case is the the national character set in the first > environemtn it is 873 in the second it is 1 so it cannot traslate betwwen > one and another. > > As well it is the csform =0 that worries me more as that should come out as > the as one of the allowable something like SQLCS_NCHAR or SQLCS_EXPLICIT > > Can we see more of the trace?? > > cheers > John > > > Date: Thu, 10 Mar 2011 09:19:11 +1100 > > Subject: Understanding trace output > > From: ivan.wi...@gmail.com > > To: dbi-users@perl.org > > > > > Hi, > > > > I'm trying to debug a problem with some code that is erroring when trying > > read a CLOB field from an oracle 10g database through DBIx::Class and > direct > > DBI calls in Catalyst. I can get the code to work when I am not trying to > do > > through Catalyst. > > > > I have noticed the following trace line from the Catalyst call > > dbd_rebind_ph(): bind :p1 <== '152756' (in, not-utf8, csid 873->0->873, > > ftype 1 (VARCHAR), csform 0->0, maxlen 8, maxdata_size 0) > > when I run the code the out side catalyst the line changes to > > dbd_rebind_ph(): bind :p1 <== '152756' (in, not-utf8, csid 1->0->1, ftype > > 1 (VARCHAR), csform 0->0, maxlen 8, maxdata_size 0) > > > > It looks like something is changing/setting some value to cause the > change > > but I can't work out what would be doing it or how to reset the value. > > > > Any suggestions on where to look or how to set the csid value? > > > > Thanks, > > Ivan > > > > -- > > email/jabber: ivan.wi...@gmail.com > > / > > / _ _ > > / \ / | | | | > > / \/ \_| | | >
Hi John, Here is the rest of the trace: DBI 1.609-ithread default trace level set to 0x0/4 (pid 4122) at Inbox.pm line 386 via Inbox.pm line 346 -> prepare_cached for DBD::Oracle::db (DBI::db=HASH(0x???????)~0x??????? 'SELECT me.id, me.part_ref, me.image_id, me.text_id, me.binary_id, me.name, me.bin_mimetype, md_mms_repos_text.text, md_mms_repos_text.text_mime FROM md_mms_repos_part me LEFT JOIN md_mms_repos_text md_mms_repos_text ON md_mms_repos_text.text_id = me.text_> 1 -> prepare for DBD::Oracle::db (DBI::db=HASH(0x???????)~INNER 'SELECT me.id, me.part_ref, me.image_id, me.text_id, me.binary_id, me.name, me.bin_mimetype, md_mms_repos_text.text, md_mms_repos_text.text_mime FROM md_mms_repos_part me LEFT JOIN md_mms_repos_text md_mms_repos_text ON md_mms_repos_text.text_id = me.text_id WHERE ( > dbd_preparse scanned 1 distinct placeholders dbd_st_prepare'd sql SELECT (pl1, auto_lob1, check_sql1) dbd_describe SELECT (EXPLICIT, lb 2000000)... Describe col #1 type=2(NVARCHAR2) Described col 1: dbtype 2(NVARCHAR2), scale -127, prec 0, nullok 0, name ID : dbsize 22, char_used 0, char_size 0, csid 0, csform 0, disize 171 fbh 1: 'ID'»NO null , otype 2-> 5, dbsize 22/172, p0.s-127 Describe col #2 type=2(NVARCHAR2) Described col 2: dbtype 2(NVARCHAR2), scale -127, prec 0, nullok 0, name PART_REF : dbsize 22, char_used 0, char_size 0, csid 0, csform 0, disize 171 fbh 2: 'PART_REF'»··NO null , otype 2-> 5, dbsize 22/172, p0.s-127 Describe col #3 type=2(NVARCHAR2) Described col 3: dbtype 2(NVARCHAR2), scale -127, prec 0, nullok 1, name IMAGE_ID : dbsize 22, char_used 0, char_size 0, csid 0, csform 0, disize 171 fbh 3: 'IMAGE_ID'»··NULLable, otype 2-> 5, dbsize 22/172, p0.s-127 Describe col #4 type=2(NVARCHAR2) Described col 4: dbtype 2(NVARCHAR2), scale -127, prec 0, nullok 1, name TEXT_ID : dbsize 22, char_used 0, char_size 0, csid 0, csform 0, disize 171 fbh 4: 'TEXT_ID'»···NULLable, otype 2-> 5, dbsize 22/172, p0.s-127 Describe col #5 type=2(NVARCHAR2) Described col 5: dbtype 2(NVARCHAR2), scale -127, prec 0, nullok 1, name BINARY_ID : dbsize 22, char_used 0, char_size 0, csid 0, csform 0, disize 171 fbh 5: 'BINARY_ID'»·NULLable, otype 2-> 5, dbsize 22/172, p0.s-127 Describe col #6 type=1(VARCHAR) Described col 6: dbtype 1(VARCHAR), scale 0, prec 4000, nullok 1, name NAME : dbsize 4000, char_used 0, char_size 4000, csid 873, csform 1, disize 4000 fbh 6: 'NAME'»··NULLable, otype 1-> 5, dbsize 4000/4001, p4000.s0 Describe col #7 type=1(VARCHAR) Described col 7: dbtype 1(VARCHAR), scale 0, prec 100, nullok 1, name BIN_MIMETYPE : dbsize 100, char_used 0, char_size 100, csid 873, csform 1, disize 100 fbh 7: 'BIN_MIMETYPE'»··NULLable, otype 1-> 5, dbsize 100/101, p100.s0 Describe col #8 type=112(SQLT_CLOB / long) Described col 8: dbtype 112(SQLT_CLOB / long), scale 0, prec 0, nullok 1, name TEXT : dbsize 4000, char_used 0, char_size 0, csid 873, csform 1, disize 40000 fbh 8: 'TEXT'»··NULLable, otype 112->112, dbsize 4000/40000, p0.s0 Describe col #9 type=1(VARCHAR) Described col 9: dbtype 1(VARCHAR), scale 0, prec 4000, nullok 1, name TEXT_MIME : dbsize 4000, char_used 0, char_size 4000, csid 873, csform 1, disize 4000 fbh 9: 'TEXT_MIME'»·NULLable, otype 1-> 5, dbsize 4000/4001, p4000.s0 row cache OCI_ATTR_PREFETCH_ROWS 6, OCI_ATTR_PREFETCH_MEMORY 0 rs_array_init: rs_array_on=0, rs_array_size=1 calling OCIAttrSet OCI_ATTR_CHARSET_FORM with csform=1 calling OCIAttrSet OCI_ATTR_CHARSET_FORM with csform=1 calling OCIAttrSet OCI_ATTR_CHARSET_FORM with csform=1 dbd_describe'd 9 columns (row bytes: 12210 max, 8070 est avg, cache: 6) 1 <- prepare= DBI::st=HASH(0x???????) at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1684 via at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Class/Storage/DBI.pm line 1777 <- prepare_cached= DBI::st=HASH(0x???????) at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Class/Storage/DBI.pm line 1777 via at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Class/Storage/DBI.pm line 516 -> bind_param for DBD::Oracle::st (DBI::st=HASH(0x???????)~0x??????? 1 '152756' HASH(0x???????) thr#??????? dbd_bind_ph(): bind :p1 <== '152756' (type 0 (DEFAULT (varchar)), attribs: HASH(0x???????) dbd_rebind_ph_char() (1): bind :p1 <== '152756' (size 6/8/0, ptype 5(VARCHAR), otype 1 ) dbd_rebind_ph_char() (2): bind :p1 <== ''15275' (size 6/8, otype 1(VARCHAR), indp 0, at_exec 1) bind :p1 as ftype 1 (VARCHAR) dbd_rebind_ph(): bind :p1 <== '152756' (in, not-utf8, csid 873->0->873, ftype 1 (VARCHAR), csform 0->0, maxlen 8, maxdata_size 0) <- bind_param= 1 at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Class/Storage/DBI.pm line 1123 via at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Class/Storage/DBI/Oracle/Generic.pm line 111 -> execute for DBD::Oracle::st (DBI::st=HASH(0x???????)~0x???????) thr#??????? dbd_st_execute SELECT (out0, lob0)... Statement Execute Mode is 0 (DEFAULT) in ':p1' [0,0]: len 6, ind 0, value='152756' dbd_st_execute SELECT returned (SUCCESS, rpc0, fn4, out0) <- execute= '0E0' at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Class/Storage/DBI.pm line 1129 via at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Class/Storage/DBI/Oracle/Generic.pm line 111 -> fetchrow_array for DBD::Oracle::st (DBI::st=HASH(0x???????)~0x???????) thr#??????? dbd_st_fetch 9 fields... dbd_st_fetched 9 fields with status of 0(SUCCESS) field #1 with rc=0(OK) field #2 with rc=0(OK) field #3 with rc=1405(NULL) field #4 with rc=0(OK) field #5 with rc=1405(NULL) field #6 with rc=1405(NULL) field #7 with rc=1405(NULL) field #8 with rc=0(OK) OCILobRead field 8 of 9 ERROR: csform 1, LOBlen 11c, LongReadLen 2000000c, BufLen 44b, Got 0c OCIErrorGet after OCILobRead (er1:ok): -1, 24812: Error while trying to retrieve text for error ORA-24812 field #9 with rc=0(OK) !! ERROR: '24812' 'Error while trying to retrieve text for error ORA-24812 (DBD ERROR: OCILobRead)' (err#1) <- fetchrow_array= ( ) [0 items] row1 at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Class/Storage/DBI/Cursor.pm line 89 via at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Class/Storage/DBI.pm line 531 1 -> FETCH for DBD::Oracle::st (DBI::st=HASH(0x???????)~INNER 'ParamValues') thr#??????? ERROR: '24812' 'Error while trying to retrieve text for error ORA-24812 (DBD ERROR: OCILobRead)' (err#1) 1 <- FETCH= HASH(0x???????)1keys at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Class/Storage/DBI/Cursor.pm line 89 via at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Class/Storage/DBI.pm line 531 -> HandleError on DBI::st=HASH(0x???????) via CODE(0x???????) -- email/jabber: ivan.wi...@gmail.com / / _ _ / \ / | | | | / \/ \_| | |