Posted on 2009-12-15 18:50:50-08 by bhitz
Oddness in CLOB inserts
This is not really a bug (since the insert works trivially), but it might be a backwards-compatibility condition. Perhas someone can give me an explanation? I apologize for the "shot in the dark" nature of this, but we have recently upgraded a bunch of hardware, software (including Oracle 9i to 10g), and I am just hoping this is obvious to someone. We have some old (ca. 2001 originally) DBI/DBD::Oracle code which handles inserts into the _one_ CLOB column in our database. We do not insert/update into this table very often and in fact the last time was Feb 2009. I am pretty sure this was using Oracle 10 The old way (I am paraphrasing the code uses:
$sth->bind_param($bindValNo, $value, {ora_type=>ORA_CLOB, ora_field=>$col_name);
This used to work (some version of DBD::Oracle prior to 1.23, probably 1.22). Currently it gives an error like:
execute failed: ORA-04043: object BUD.Seq does not exist (DBD ERROR: Can't match some parameters to + LOB fields in the table, check type and name) [for Statement "INSERT INTO BUD.Seq (seq_version, f +eature_no, residues, seq_length, is_current, seq_type) VALUES (?, ?, ?, ?, ?, ?)" with ParamValues +: :p1='2009-12-14', :p2='8613', :p3='CCGGCTTTCTGACCGAAATTAAAAAAAAAAAATGAAAATGAAACCCTGTTCTTTAGCCCTA +CAGCACTTCTACATAGCCCTAAATAGCCCTAAATAGCCCTCATGTACGTCTCCTCCAAGCCCTGTTGTCTCTTACCCGGATGTTCAACCAAAAGCTAC +TTACTACCTTTATTTTATGTTTACTTTTTATAGATTGTCTTTTTATCCTACTCTTTCCCACTTGTCTCTCGCTACTGCCGTGCAACAAACACTAAATC +AAAACAGTGAAATACTACTACATCAAAACGCATATTCCCTAGAAAAAAAAATTTCTTACAATATACTATACTACACAATACATAATCACTGACTTTCG +TAACAACAATTTCCTTCACTCTCCAACTTCTCTGCTCGAATCTCTACATAATAATATATCAAATCTACCGTCTGGAACATCATCGCTATCCAGCTCTT +TGTGAACCGCTACCATCAGCATGTACAGCGGTACCCTCGTGTTATCTGCAGCGAGAACTTCAACGTTTGCCAAATCAAGCCAATGTGGTAACAACCAC +ACCTCCGAAATCTGCTCCAAAAGATATTCCAGTTTCTGCCGAAATGTTTTATTGCAGAACAGCCCTATCAGCATCGACAGGAATGCCGTCCAATGCGG +CACTTTAGATGGGGTAACTCCCAGCGCAAGCTGATCTCGCAAGTGCATTCCTAGACTTAATTCATATCTGCTCCTCAACTGTCGATGATGCCTGCTAA +ACTGCAGCTTGACGTACTGCGGACCCTGCAGTCCAGCGCTCGTCATGGAACGCAAACGCTGAAAAACTCCAACTTTCTCGAGCGCTTCCACAAAGACC +GTATCGTCTTTTGCCTCCCATTCTTCCCGGCACTTTTTTTCGTCCCAGTTCAAAAAGTACTGCAGCACCTCTGTCTTCGATTCACGCAAGTTGCTCCA +TACTTTATAATACAACTCTTTGATCTGCCTTCCAGACATGCGGAAAACTTGG...', :p4=784334, :p5='Y', :p6='genomic'] However, I cannot really call this a bug. It works fine if you just skip the bind_value(...{ora_ty +pe=>ORA_CLOB})
If others think this is a real problem, or a symptom of a real problem (nascent bug) let me know and I will provide full info/test script etc. Thanks, Ben
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.