Subject: | missing text lob type in DBIx::Class::Storage::DBI |
Date: | Mon, 22 Jul 2013 16:43:07 +0200 |
To: | "'bug-DBIx-Class [...] rt.cpan.org'" <bug-DBIx-Class [...] rt.cpan.org> |
From: | Jonathan Stowe <jonathan.stowe [...] db.com> |
Classification: Public
Hi,
In DBIx::Class::Storage::DBI the method _is_lob_type has
$data_type && ($data_type =~ /lob|bfile|text|image|bytea|memo/i
And the _is_text_lob_type has
$data_type && ($data_type =~ /^(?:clob|memo)\z/i
Whereas I suspect that it should be:
$data_type && ($data_type =~ /^(?:clob|memo|text)\z/i
On Oracle assuming that we have relied on SQL::Translator to do translate a column defined as "text" to "clob" in the schema (which it does, ) this will result in:
DBI Exception: DBD::Oracle::st execute failed: ORA-00932: inconsistent datatypes: expected CLOB got BLOB..
because the ora_type is being set incorrectly in the bind_params in DBIx::Class::Storage::DBI::Oracle::Generic (it defaults to ORA_BLOB .)
Thanks.
---
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.