Subject: | Scrambled field names on DBD::Oracle |
Some complex SQL columns in a DBIC-generated query get scrambled.
Example:
$where = { 'name||description||bl||username' => "%asdf%" };
$rs->search( $where )->all;
The resulting statement and error:
DBIx::Class::ResultSet::all(): DBI Exception: DBD::Oracle::db prepare_cached failed: ORA-00904:
"SR_8C6ZTZCIQ8": identificador no vĂ¡lido (DBD ERROR: error possibly near <*> indicator at char 129 in
'SELECT me.id, me.name, me.description, me.active, me.ts, me.bl, me.username, me.ns FROM mytable me
WHERE ( Nm||dscrptn||bl||<*>sr_8C6ZTZCIQ8 = :p1 ) ')
Sometimes it may work... I couldn't nail which queries are bad and which aren't. Apparently the vowels
are removed and the rest of the line gets scrambled.
This problem only occurs with DBD::Oracle and DBIC 0.08192 (0.08127 works fine). Tried with different
versions of modules (SQL::Abstract, DBD::Oracle, Perl 5.10.1 and 5.14, Linux, AIX), and it all
indicates that DBIC is the culprit. It works fine with DBD::SQLite.