Oracle DB support improvements(bug#13227 on mantisbt.org) for Mantis 1.3

Changes tested with MySQL and Oracle.